Skip to content

Related Posts: Clarify relation of legacy option to block #11021

Open

Description

@ockham

We're currently claiming the following at /wp-admin/admin.php?page=jetpack#/traffic:

image

(per

'The following settings will impact all related posts on your site, except for those you created via the block editor:'
)

However, disabling that setting causes Related Posts blocks to disappear from the frontend as well.

Steps to reproduce the issue

  1. Write a post, insert a Related Posts block, publish, view
  2. Verify that it contains the related posts block on the fronted
  3. Go to /wp-admin/admin.php?page=jetpack#/traffic
  4. Disable the Show related content after posts toggle seen in the screenshot (this will disable the Related Posts module)
  5. Reload the post

What I expected

The Related Posts block is gone

What happened instead

The Related Posts block to remain

Context

The reason is this line

if ( ! $options['enabled'] || 0 == (int)$post_id || empty( $options['size'] ) || get_post_status( $post_id) !== 'publish' ) {

which checks for $options['enabled']. While we do set it to true by default, i.e. if $options['enabled'] isn't set, see

if ( ! isset( $this->_options['enabled'] ) )
$this->_options['enabled'] = true;
, this correctly doesn't change an explicit user-set false value to be overridden.

I found this on WP.com while testing D22588-code on a site that had the Related Posts setting switched off (from an earlier round of testing).

Possible solution

The simplest possible solution is to change the wording of

'The following settings will impact all related posts on your site, except for those you created via the block editor:'
to make clear that the top toggle actually impacts Related Posts blocks, too (as opposed to the other, layout-modifying toggles). Better yet, we should probably keep the The following setting will impact all related posts on your site part above the first toggle, and add a line The following settings will not impact Related Posts block, whose layout you can control manually in the block editor or so below that first toggle.

We might want to add something similar to the corresponding Calypso setting.

These might be some good first steps.

Further considerations

In general, our strategy has been to disable blocks if their corresponding modules are disabled, so it seems to make sense that this toggle will also disable Related Posts blocks.

To the user, that toggle has mostly visual implications -- it hides legacy Related Posts from the bottom of all pages.

This introduces the following problem: If a user only wants to display Related Posts by explciitly inserting them into posts (but not at the bottom of all posts, as the legacy functionality would), they will probably disable the toggle. That, however, will also cause the blocks to disappear. In other words, AFAICS we currently don't provide any way to achieve that kind of behavior.

/cc @tyxla

Activity

  1. added
    Bug
    [Focus] Blocks
    on Dec 20, 2018
  2. added this to the 6.9 milestone on Dec 20, 2018
  3. jeherve commented on Dec 20, 2018

    @jeherve
    Member

    add a line The following settings will not impact Related Posts block, whose layout you can control manually in the block editor or so below that first toggle.

    That seems like the easiest solution; we're basically moving the warning one line down, and it makes sense then.

  4. added
    [Status] Needs Design Review
    on Jan 2, 2019
  5. modified the milestones: 6.9, 7.0 on Jan 3, 2019
  6. danjjohnson commented on Jan 10, 2019

    @danjjohnson

    This seems related, but let me know if it requires a new issue...

    The settings says "Show related content after posts" but with the block editor you can insert them anywhere within a post.

    Should we change the main toggle to something like "Enable related posts", and change the text to explain that if related posts are not added via the block editor then they will display after the post?

    Also the settings page in Calypso does not have the line:

    The following settings will impact all related posts on your site, except for those you created via the block editor:

  7. removed this from the 7.0 milestone on Jan 21, 2019
  8. simison commented on Feb 11, 2019

    @simison
    Member

    @danjjohnson thanks, I opened an issue about that: Automattic/wp-calypso#30711

  9. jeherve commented on Feb 15, 2019

    @jeherve
    Member

    Noting that #11342 was just merged and addresses some of those issues.

  10. simison commented on Feb 18, 2019

    @simison
    Member

    Also Calypso side merged Automattic/wp-calypso#30713

  11. aldavigdis commented on Feb 28, 2019

    @aldavigdis
    Contributor

    I suggest we involve the A8C editorial team here? It does look like #11342 covered this pretty well. Should we close this issue?

  12. 6 remaining items

  13. reopened this on Mar 1, 2019
  14. jeherve commented on Apr 4, 2019

    @jeherve
    Member

    More discussion about this in #11859

  15. MichaelArestad commented on Jun 28, 2019

    @MichaelArestad
    Contributor

    I think we should decouple the block from the module. The block should be always on regardless of whether the module is. This should be the same for other blocks in the same circumstance.

    #11861 (comment)

  16. removed
    [Status] Needs Design Review
    on Jun 28, 2019
  17. removed their assignment
    on Aug 28, 2019
  18. jeherve commented on Aug 11, 2021

    @jeherve
    Member

    Related: #20628


    Typically the Related Posts feature is enabled via the Jetpack settings, and results in the feature being automatically appended to the end of posts.

    This concept doesn't make sense for an FSE site, since the user should be able to fully control the site's appearance through templates. In an FSE site the user "manually" adds the feature by adding the Related Posts block into their preferred template. As such, toggling the setting doesn't actually do anything (this is also true for wpcom simple sites).

    This can obviously be confusing, since a user might see the setting and turn it on, expecting Related Posts to automatically be appended (or likewise shut it off and expect them to stop appearing). Moreover, it can create confusion when a user switches from a classic theme with the feature enabled to a blocks theme. Unless they go add the block to one of their templates, they will silently lose the feature.

    Describe the solution you'd like

    At minimum I suggest removing the setting from the Jetpack Settings as well as the wpcom Settings -> Reading page when a blocks theme is enabled.

    To address the latter issue with switching themes, maybe we could do something with Jetpack's JITM. When Related Posts are enabled and the user switches from a classic to a blocks theme, we could serve a JITM suggesting the user add the block to their Single Post template.


    cc @stacimc

  19. added
    [Focus] FSE
    on Aug 11, 2021
  20. jeherve commented on Aug 11, 2021

    @jeherve
    Member

    toggling the setting doesn't actually do anything (this is also true for wpcom simple sites).

    It does hook a few things in though: the customizer panel and the settings in Settings > Reading for example will only happen once you activate the module.

    At minimum I suggest removing the setting from the Jetpack Settings as well as the wpcom Settings -> Reading page when a blocks theme is enabled.

    I don't know that I would remove the setting entirely, since some may want to disable it for performance reasons.

    To address the latter issue with switching themes, maybe we could do something with Jetpack's JITM. When Related Posts are enabled and the user switches from a classic to a blocks theme, we could serve a JITM suggesting the user add the block to their Single Post template.

    That would be nice indeed! I think communication around this is a good way to clarify things a bit.

    Maybe, as suggested above in this issue, we could also adjust the wording in Jetpack > Settings to clarify how things work. We could even adjust that wording based on the active theme.

    See #24072 for an attempt at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug[Block] Related Posts[Feature] Related Posts[Focus] Blocks[Focus] FSE[Pri] Normal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions