Views "Items per page" not respected by Layout Builder

Created on 26 September 2024, about 2 months ago

Problem/Motivation

The Views block display setting, "Allow settings: Items per page," is not respected when the Views block is placed in Layout Builder. Since Views and LB are both in core, you would expect them to work together in this respect.

Steps to reproduce

Create a Views block to show any content type (I used Article) where there are at least two nodes (or create two nodes).
In the Views display, set "Display a specified number of items" to 2 and "Allow settings" to "Items per page"
Enable Layout Builder on any content type and add that Views display to it.
Configure the block in the Layout and set "Items per block" to 1.
Visit a node of that content type and the block will show the original Views items per page, 2, instead of the overridden value of 1.

Proposed resolution

Unknown at this time.

🐛 Bug report
Status

Active

Version

10.3

Component

layout_builder.module

Created by

🇨🇦Canada darkodev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @darkodev
  • 🇺🇸United States ccarnnia

    ++
    in the same ballpark:
    pagination of /admin/structure/views/view/taxonomy_term/ intermidently disappears if layout_builder is enabled for the `full` display of the term.

  • 🇮🇳India vinai_katiyar Delhi NCR

    Hi @darkodev,

    I tried to reproduce issue on my local machine but unable to reproduce the issue.

    I've attached a recording of the steps I followed to reproduce the issue and kindly help me if I followed any incorrect steps to reproduce the issue.

  • 🇨🇦Canada darkodev

    Not sure what bug I introduced, or was introduced by one of my contrib modules, but it seems to have been resolved. The Views number of items now gets overridden in my Layout Builder layouts as it should.

    Thanks, @vinai_katiyar for the thorough demo video!

    @ccarnnia, not sure if your issue is related, but let's close this issue to keep it clean and you can perhaps log a separate issue?

Production build 0.71.5 2024