Does not work with data export + paging

Created on 14 May 2024, 7 months ago

Problem/Motivation

When using Views Aggregator, something about the pager causes attachments like Data export to break the view. It appears to incorrectly formulate the route to the data export page, missing the view machine name.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view..data_export_1" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Steps to reproduce

  1. Create a view with a page. Initially have the pager/limit set to 0 (all items), display as a Table with aggregation options. (I didn't need to set any aggregation options, can reproduce just using this display style for the view.) Display whatever you want, the default title field is fine
  2. Add another display that is a 'Data export'. Attach it to the page, and put in minimal export settings so that you can save it.
  3. Go back to the 'page' view, may need to clear cache if needed. Observe that the preview works (or check the real view).
  4. Edit the page and change pager settings to "mini" or "full" pager to limit the options. Observe that the preview no longer refreshes and the view page will not load (error).

For posterity, I switched a couple settings around to make sure it was exactly this combination that causes the problem.

  • If the pager shows all, or a limited number of results without a pager, it works.
  • If the page displays as a Table, it works.
  • Error is the same with or without use of filters, sorts, etc.
πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tlwatson

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

Comments & Activities

  • Issue created by @tlwatson
  • πŸ‡¨πŸ‡¦Canada jdhildeb

    I hit this same issue.

    I found that it is related to the "Column aggregation row applies to" setting within Format -> Settings.

    If you set "Column aggregation row applies to" to "the page shown" then the error goes away. Switching it back to "the entire result set" causes the error to occur.

  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    Is this related to πŸ› Exposed filters aggregation (regression?) Active and is this problem fixed by the proposed patch in that issue?

  • πŸ‡ΊπŸ‡ΈUnited States daveonaka

    I ran into a similar error after update to version 2.1.0 - an existing View with aggregator table had a linked Views Data Export. After update, the Aggregator Plus page did not display and the error message about "route does not exist" appeared. It looks like the database update (after running Drush database update) wipes the path?

  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    The update function did not make any database changes - it only changed the datatypes of three configuration variables used internally to views_aggregator. Specifically, routes and all other configuration variables were left unchanged. Only views that used views_aggregator were changed, and only the displays on those views that used these three configuration variables

    I would try to re-save your view, and clear your caches, but I don't see how anything the update did could have affected a route anywhere on your site.

    What route in particular is it missing? Is it possible for you to compare an export of the old view and the new view and post that here so I can see what changed?

  • πŸ‡«πŸ‡·France yonailo Paris

    I am hitting this issue too, the patch of issue 3439536 πŸ› Exposed filters aggregation (regression?) Active does not fix it.

    As stated in the original PR, the issue appears when using a pager.

  • πŸ‡«πŸ‡·France yonailo Paris
Production build 0.71.5 2024