When duplicate the view as entity references, the pager doesn't work.

Created on 25 March 2023, about 2 years ago

For drupal version: 9.5.7
When duplicate the view as entity references, the pager doesn't work.

Steps:
1.Create views of any entity (view id:test), e.g. node.
2.Publishes articles for this entity. (At least two articles)
3.Duplicate the view as entity reference, set Advanced > Machine Name: (test)
4.Set view paper for Display a specified number of items.
5.Enter 1 to Items per page.
6.Install modules (token, token_filter, text_block, insert_view_adv)
7.Set Full HTML formats (/admin/config/content/formats)
8.Enabled filters: (Advanced Insert View, Replaces global and entity tokens with their values)
9.Filter processing order: (Advanced Insert View) for 1, (Replaces global and entity tokens with their values) for 2.
10.Place block: (/admin/structure/block), search (Text Block) and click Place block.
11.Type code: (select Full HTML editor)
<drupal-view data-arguments='' data-display-id='test' data-view-id='test'></drupal-view>
12.Access the node page.
13.You will see it to print all items, rather than one by settings. (the step 5)

πŸ› Bug report
Status

Active

Version

9.5

Component
ViewsΒ  β†’

Last updated about 4 hours ago

Created by

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

Comments & Activities

  • Issue created by @msn5158
  • Status changed to Postponed: needs info about 2 years ago
  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Thanks for reporting your issue.

    Using just core and an Umami install I don't see a problem, I duplicate the content page display as an entity reference, set that entity reference display to 1 item and it only shows 1 item.

    You steps also use a fair number of contrib modules, are there any steps to reproduce this with just drupal core? Is there anything to indicate that this is an issue in Drupal core and not one of the contrib modules?

  • Hello,

    I don't know how you test no problem, but I tested it in drupal version 9.4.x is normal, but not in version 9.5.x, I use these modules (insert_view_adv, views_entity_embed, snippet_manager) embedded views all not working for paper (just view as entity references, but if as block it is normal)

    Could you tell me your test steps, and test my steps, note that must be version 9.5.x

    Thank you

  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Well, this has been logged as a bug under Drupal core. So if this is indeed a Drupal core bug, I'd like to see some evidence of that. So I tried the only steps that are provided for Drupal core (on Drupal 10.1.x): 3.Duplicate the view as entity reference, set Advanced > Machine Name: (test) and then messed around with the pager, which seemed to work just fine.

    Can you provide any steps to reproduce your issue in a way that indicates that this is a problem in Drupal core and not in any of the contrib modules you seem to need to reproduce this issue? This could well be an issue in insert_view_adv, views_entity_embed, or snippet_manager, and if so, this bug should be moved to the correct module that is actually causing the issue (I'm not saying this isn't a core bug, it might be, but there is no way of knowing with the current steps).

  • First commit to issue fork.
  • It also might be the module problem, but I don't know how to test it output pages as an entity reference view, Because it is not a block, in the layout block can't find it, Only use the Third-party modules embedded way, can you tell me how to test only use the core and then I test it in your way on the version 9.5.x

  • πŸ‡³πŸ‡±Netherlands tinto Amsterdam

    I tried to reproduce this issue on a fresh install of Drupal 9.5.8-dev, but cannot seem to get the same results in the frontend.

    However, I do see this issue appearing in the preview section of the Views UI. The block display of my "test" view has a pager, whereas the entity reference display does not:

    You do not need to install any contrib modules to reproduce this outcome.

  • πŸ‡³πŸ‡±Netherlands tinto Amsterdam

    P.S. The steps to reproduce could do with some improvements.

    Step 3 mentions "duplicate the view", but it should duplicate the view display. Also, when duplicating the view display, I get Error message: Display "Entity Reference" needs a selected search fields to work properly. See the settings for the Entity Reference list format.. This seems like a crucial step to add IMO.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    This was discussed in #bugsmash, so I am adding the tag.

    Is an new issue needed for the problem found in #7.

    @rckstr_rohan, To receive credit for contributing to this issue, assist with other outstanding tasks or unaddressed feedback. See the issue credit guidelines β†’ for more information.

  • @Lendude I understand what you mean, You just see the view UI preview, Yes, in the view UI preview, it is only print 1 item, Here in my test is also same as you, But, in the frontend it shows different, It shows all items, like @tinto test, the same as mine, can you try it to use your method, and have a look at the results in the frontend.

  • πŸ‡³πŸ‡±Netherlands tinto Amsterdam

    I agree: #7 may be somewhat unrelated (and might merit a separate issue). Sorry for the confusion.

    @msn5158, the trouble here is to determine if this is a core bug or if it is caused by one of the 4 contrib modules needed to reproduce this. In order to move forward here, we need to find the culprit so we can pinpoint which part of the code is causing this. At this point I have no clue where to even start looking.

    Do you see any possibility of somehow reproducing this issue without the contrib modules - or perhaps with different contrib modules? Perhaps output the view block directly in a twig template to see if that works?

  • I also didn't find a way to reproduce, But I use several modules test and get the same results, by rights should not be several modules are the same bug on an issue.

  • πŸ‡¦πŸ‡ΊAustralia pameeela

    @msn5158 if you can't reproduce the issue in core alone, then you need to work out which module is causing the bug, and we can move the issue into that project's queue. Until that is done there is no way to fix it.

    If that info isn't provided within ~3 months, this issue may be closed.

  • Status changed to Closed: cannot reproduce 4 months ago
  • πŸ‡³πŸ‡±Netherlands tinto Amsterdam

    Revisited this issue during the DrupalCon Singapore 2024 Contrib Day.

    It's been 6 months after the last update, and 2 years since the OP's last follow-up. Also, we are still unable to determine if this is a Drupal core problem or that one of the contrib modules is causing the issue, as there are no clear instructions to reproduce the issue without any additional contrib modules.

    Taking the above into account, I'm going to mark this issue as Closed (cannot reproduce).

    If anyone feels this is still an issue, please provide clear steps to reproduce in a clean Drupal 11 install - without any contrib modules installed - so we can further investigate.

    Thank you @msn5158 and others for the time and effort you put into this!

Production build 0.71.5 2024