Disabled views Displays causing error message in Views UI / caused by ajax error

Created on 24 August 2024, 8 months ago

Problem/Motivation

I installed the calendar module and added a calendar. This is creating 4 Displays (Month/Week/Day/Year). As I have no need for Week and Day Display (today) - I disabled the two Displays for now.

From this moment the views UI is showing an error:

Developer console shows an HTTP error 500 for URL
/admin/structure/views/view/content_field_FOO_on_calendar/preview/page_week?_wrapper_format=drupal_ajax

with this response:

The website encountered an unexpected error. Try again later.<br>
<br>
<em class="placeholder">Symfony\Component\Routing\Exception\RouteNotFoundException</em>
: Route &quot;view.content_field_FOO_on_calendar.page_week &quot;does not exist. in <em class="placeholder">Drupal\Core\Routing\RouteProvider-&gt;getRouteByName()</em>
(line <em class="placeholder">208</em>
of <em class="placeholder">core\lib\Drupal\Core\Routing\RouteProvider.php</em>
).

That looks like a views bug to me and not calendar issue. Tested on Drupal 10.3.2 with Calendar 8.x-1.0-beta2.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.3 ✨

Component
ViewsΒ  β†’

Last updated about 5 hours ago

Created by

πŸ‡©πŸ‡ͺGermany marc.bau

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

Comments & Activities

  • Issue created by @marc.bau
  • Status changed to Postponed: needs info 8 months ago
  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Can you reproduce this with just core?

    I tried and couldn't with the provided information. What I tried:
    * On a clean Umami install
    * Go to the content view
    * Duplicate the page display and give the new display a new route
    * Save the View
    * Disable the new display
    * Save the View
    * Click around the View UI => no problems

    So not sure what the issue is, but it's not just having a disabled View with a route, it seems to need more to break

  • πŸ‡©πŸ‡ͺGermany marc.bau

    I do not know if it breaks in core. I have seen the issue in calendar module and this is 100% reproducible.

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

    I think I have a similar issue with the following steps to reproduce.

    1. Create view as a Page
    2. Set Page path
    3. Save view
    4. Add page into a menu
    5. Open the view and disable the Page
    6. Save view

    Result is "Oops, something went wrong. Check your browser's developer console for more details. " When looking at the browser

    Uncaught TypeError: document.querySelector(...) is null
        g https://example.com/admin/structure/views/view/testviewname/edit/page_1 line 827 > injectedScript:3
    page_1 line 827 > injectedScript:3:79

    and

    Uncaught 
    Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: /admin/structure/views/view/testviewname/preview/page_1\nStatusText: error\nResponseText: The website encountered an unexpected error. Try again later.", name: "AjaxError", stack: "@https://example.com/core/misc/ajax.js?v=10.4.1:196:32\n@https://example.com/core/misc/ajax.js?v=10.4.1:1935:3\n" }
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies β†’ .

Production build 0.71.5 2024