Giter Site home page Giter Site logo

Comments (4)

cecoates avatar cecoates commented on August 14, 2024

I have a user with almost the same issue. I was able to test/confirm on my own Atomic site.

However, a slight difference is A) the user and I weren't using the panel page as the "Front Page" and B) I could only reproduce on Atomic sites.

Steps to replicate

  1. Activate Shoreditch on an Atomic site.
  2. Make sure like buttons for the site are turned on under My Site > Sharing
  3. Create a page with the Panel Page template
  4. Give that page a few child pages
  5. Make sure the Like button is turned off for each individual Child Page
  6. View the Parent Panel Page - like buttons appear on the child panels
  7. Disable the site like buttons setting and view the panel page again. Like buttons disappear.

As a temporary workaround I gave the user some CSS to hide the like button entirely:

/* Hide Like Button */
#content div.sharedaddy, #main div.sharedaddy, div.sharedaddy {
    display: none;
}

With the idea that if they decide later they only want to hide it on pages or somewhere more specific, the CSS could be tweaked so that it's not disabled site-wide.

from themes.

sixhours avatar sixhours commented on August 14, 2024

I am able to reproduce this, though it happens regardless of whether the Panel Page is set to the home page or not.

I suspect this is similar to Automattic/jetpack#8990 , in that Likes settings are tied into the page's main query rather than the subsequent child page query.

I'm going to test this theory by applying a similar setup to Affinity, which also uses a separate query on a page to build out the contents.

from themes.

sixhours avatar sixhours commented on August 14, 2024

I confirmed that the same thing happens in Affinity, with the following steps to reproduce:

  1. Activate Affinity.
  2. Make sure like buttons for the site are turned on under My Site > Sharing.
  3. Create a couple of Pages, and turn Likes off for those pages.
  4. Set a Static Front Page under Customize -> Homepage Settings.
  5. Go to Customize -> Theme Options -> Panel 1 and select one of the pages created in step 3.
  6. Go to Customize -> Theme Options -> Panel 2 and select the other page created in step 3.
  7. Publish changes and view your home page. The Likes settings for the individual child pages are not respected; you'll still see Likes enabled, even though they've been turned off for those child pages.

The individual page Likes settings are overruled by the global Likes settings because we're displaying those pages outside the main query. This gets even more complicated when you set a static front page, since that has its own global Likes settings as well.

This is not specific to these themes; it will happen any time we display content outside the main query (I've seen similar tickets with bugs when Likes are enabled/disabled on Featured Content, for example).

I'm going to move this to a Jetpack ticket. The workaround for now is to turn off Likes globally, or to hide them using Custom CSS.

from themes.

sixhours avatar sixhours commented on August 14, 2024

Reported in Automattic/jetpack#9002 and included user information for follow-up.

from themes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.