Closed (fixed)
Project:
DraggableViews
Version:
2.1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2022 at 01:01 UTC
Updated:
16 May 2026 at 00:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
loze commentedComment #3
loze commentedComment #4
loze commentedComment #5
loze commentedHere is a patch that fixes it.
Comment #6
loze commentedComment #7
fredonia_webteam commentedWe are having this issue along with another error which states a view (that is available) does not exist on a page that does not have that view on it. This occurred after updating draggableviews from 2.0.1 to 2.1.1.
Error as follows:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.my_links.my_links_reorder_block" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /code/web/core/lib/Drupal/Core/Routing/RouteProvider.php).
Comment #8
fox mulder commentedThe problem still exists by us ( draggableviews version: 2.1.1 ), because:
1. I applied the patch #5, but it works only if in the "Draggableviews: DraggableViews Weight" sort setting of the ordering view display ( e.g.: /admin/structure/views/view/MY_VIEW_MACHINE_NAME/edit/MY_DISPLAY_MACHINE_NAME ) in the "Draggable Views Data" dropdown I use: "This View/Display". But I can choose here My View -> My Display too ( !== 'this' )
2. An ordering view display can be a block, and block type view display doesn't have a route, but draggableviews_contextual_links_alter() tries to set this non existing route as $links[$link_key]['route_name']
Comment #9
fox mulder commentedpatch that tries to fix issues in #8
Comment #10
chikeI can confirm #8 as I have two views block displays, one block added on the page and the other used for sorting. Patch #5 didn't work while patch #9 worked.
Comment #11
z3cka commentedPatch from #9 works like a charm. Thanks for the patch!
Comment #12
loze commentedYes #9 works
Comment #13
joco_sp commented#9 works
Comment #14
loze commentedAfter further testing, i've realized this is not working correctly for draggable views that use contextual filters that require a route parameter.
The route parameters are not passed along and I am getting this error.
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("node") to generate a URL for route "view.gallery_groups.page_1". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 181 of ...../core/lib/Drupal/Core/Routing/UrlGenerator.php).Comment #15
loze commentedI think this got it working.
I added a hook_views_pre_render() implementation where Im adding the params of the current route to the draggableviews contextual link render array.
This allows it to work when your draggableview requires a contextual filter.
Comment #16
lily.yan commentedI can confirm that applying patch https://www.drupal.org/files/issues/2023-03-16/draggableviews-route-erro... to draggableviews 2.1.2 can fix the issue.
Comment #17
adrianm6254 commentedI applied patch #15 and it has cleared up all the RouteNotFoundExceptions I was getting.
Comment #18
programeta commentedI can confirm that patch #15 works for me.
Comment #19
j_s commentedPatch #15 works for me. No more errors about this issue in log. Thanks!
Comment #20
joco_sp commented#15 works
Comment #21
besek commented#15 works like a charm, thanks!
Comment #22
rclemings commentedAnother vote for #15. That makes seven so I'll set it to RTBC.
Comment #23
loze commentedWhile this does work, the "order view" contextual link is always shown regardless of the users permission to access the sort page.
Comment #24
loze commentedComment #25
loze commentedThis one checks the route access and unsets the contextual link if false.
Comment #26
alex.bukach commented#25 worked for me!
Comment #28
loze commented#25 was no longer applying with the latest 2.1.x updates. This MR40 is the patch from #25 with the merge errors resolved.
Comment #29
loze commentedComment #30
loze commentedComment #32
david.muffley commentedUploading a patch file for the current diff of MR!40.
Comment #33
devad commentedPatch #32 fixed the issue for me.
DraggableViews 2.1.4
D10.3.1
PHP 8.1
Comment #34
tonka67 commentedPatch #32 fixes the immediate problem but throws a sitewide error for me:
[Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. See
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
DraggableViews 2.1.4
D 10.3.2
PHP 8.2.21
Comment #35
andresgmh commentedRe-rolling patch for 2.1.4 version.
Comment #36
istryker commentedI can confirm this removes the error. This fix removes the "Order View" contextual link.
How to reproduce the removal
- Install 2.1.x draggableviews
- Install the draggableviews_demo module (with it having the default Draggable Views Data of "Order Page")
- GoTo the draggableviews display page (/draggableviews-demo)
- Check the contextual links....you will see Order View
Now
- Git Checkout 3316975-contextual-link-error
- Clear cache
- GoTo the draggableviews display page (/draggableviews-demo)
- Check the contextual links....you will NOT see Order View
Comment #37
fox mulder commentedpatch added in #35 causes error:
Uncaught PHP Exception TypeError: "draggableviews_views_pre_render(): Argument #1 ($view) must be of type ViewExecutable, Drupal\\views\\ViewExecutable given" at .../web/modules/contrib/draggableviews/draggableviews.module line 276
Comment #38
bohus ulrychYes, patch #35 breaks e.g. /admin/content/files View. Reason is missing
use Drupal\views\ViewExecutable;
because is used
function draggableviews_views_pre_render(ViewExecutable $view)
Comment #39
loze commentedPatch #35 does not work as pointed out in #38
Patch #32 does work which is a diff for MR40. Please test against those.
Comment #40
bohus ulrychPatch #32 seems to be working without any problems or errors.
Comment #41
stijndPatch #32 works perfect, using 2.1.4 with Drupal 10.3.5
Comment #43
istryker commented#32 works. Committed
Comment #45
douggreen commentedThis was committed 5 months ago, can you create a new release with it in it?
Comment #46
kobusvw commentedHi #istryker, I noticed that this was committed about 8 months ago—would it be possible to create a new release that includes it? We’d really appreciate it, as we’re in need of the update. Thanks so much in advance!
Comment #47
bdunphy commented@istryker - any chance this can be placed in a release? Looking to deploy. Thanks!
Comment #48
anybody@istryker this still has no stable release, could you please do it? Thank you!
Comment #49
anybodyComment #50
handkerchiefAny news about a new release?
Comment #51
johnpicozziCan confirm the Patch in #32 resolved the problem and agree it would be great if we could get a release tagged. Thanks for all the hard work all!