Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291943

Pagination does not work correctly for comment fields when using Layout Builder

$
0
0

Problem/Motivation

Pagination does not work correctly for comment fields that are rendered using Layout Builder.

Everything is displayed correctly, but the links to pages in the pager are not formed correctly and regardless of which link you follow from the pager the first page contents are always shown. This makes it impossible to view any other than the first page of comments.

The last parts of the links in the pager will be in the form of:

?page=1%2C0
?page=2%2C0
?page=3%2C0

When disabling Layout Builder for the content type, the pager links look and work as expected. E.g. ?page=1

If you configure the comments field to use a different pager ID the links have similar ends, but you can now navigate to other pages of comments. However, if you have a link configured on another page to show the number of new comments on a node, following that link will take you to the first page of comments even if the new comments are on a later page. This behaviour does not occur when not using Layout Builder.

No other pagers are present on the rendered page.

Changing the number of of comments displayed on a page does not correct the behaviour. Neither does enabling threaded view of comments.

This behaviour has been rock solid consistent for me. If I disable Layout Builder for the content type, the problem goes away. However, turn it back on, and the problem is back.

I have temporarily removed other fields rendered for this content type to see if there might be a conflict, but this does not resolve the behaviour.

I don't know if it's a related issue, but my experience appears to be identical to that discussed here: https://www.drupal.org/project/drupal/issues/3189538

Steps to reproduce

1. Enable Layout Builder for a content type.
2. Go to the Manage Layout page for the content type and ensure that the comments field is present for the used view mode.
3. Visit a node from the selected content type that has enough comments to be paginated.
4. Attempt to navigate to any other than the first page of comments.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291943

Trending Articles