Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loze created an issue. See original summary.

loze’s picture

Issue summary: View changes
loze’s picture

Issue summary: View changes
loze’s picture

Issue summary: View changes
loze’s picture

StatusFileSize
new581 bytes

Here is a patch that fixes it.

loze’s picture

Status: Active » Needs review
fredonia_webteam’s picture

We 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).

fox mulder’s picture

The 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']

fox mulder’s picture

StatusFileSize
new1.02 KB

patch that tries to fix issues in #8

chike’s picture

I 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.

z3cka’s picture

Patch from #9 works like a charm. Thanks for the patch!

loze’s picture

Status: Needs review » Reviewed & tested by the community

Yes #9 works

joco_sp’s picture

#9 works

loze’s picture

Status: Reviewed & tested by the community » Needs work

After 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).

loze’s picture

Status: Needs work » Needs review
StatusFileSize
new1.75 KB
new830 bytes

I 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.

lily.yan’s picture

I 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.

adrianm6254’s picture

I applied patch #15 and it has cleared up all the RouteNotFoundExceptions I was getting.

programeta’s picture

I can confirm that patch #15 works for me.

j_s’s picture

Patch #15 works for me. No more errors about this issue in log. Thanks!

joco_sp’s picture

#15 works

besek’s picture

#15 works like a charm, thanks!

rclemings’s picture

Status: Needs review » Reviewed & tested by the community

Another vote for #15. That makes seven so I'll set it to RTBC.

loze’s picture

While this does work, the "order view" contextual link is always shown regardless of the users permission to access the sort page.

loze’s picture

Status: Reviewed & tested by the community » Needs work
loze’s picture

Status: Needs work » Needs review
StatusFileSize
new1.96 KB
new892 bytes

This one checks the route access and unsets the contextual link if false.

alex.bukach’s picture

#25 worked for me!

loze’s picture

#25 was no longer applying with the latest 2.1.x updates. This MR40 is the patch from #25 with the merge errors resolved.

loze’s picture

loze’s picture

david.muffley made their first commit to this issue’s fork.

david.muffley’s picture

StatusFileSize
new2.04 KB

Uploading a patch file for the current diff of MR!40.

devad’s picture

Status: Needs review » Reviewed & tested by the community

Patch #32 fixed the issue for me.

DraggableViews 2.1.4
D10.3.1
PHP 8.1

tonka67’s picture

Patch #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

andresgmh’s picture

Issue summary: View changes
StatusFileSize
new1.51 KB

Re-rolling patch for 2.1.4 version.

istryker’s picture

Status: Reviewed & tested by the community » Needs work

I 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

fox mulder’s picture

patch 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

bohus ulrych’s picture

Yes, 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)

loze’s picture

Status: Needs work » Needs review

Patch #35 does not work as pointed out in #38

Patch #32 does work which is a diff for MR40. Please test against those.

bohus ulrych’s picture

Patch #32 seems to be working without any problems or errors.

stijnd’s picture

Patch #32 works perfect, using 2.1.4 with Drupal 10.3.5

  • istryker committed d1a4a588 on 2.1.x
    Issue #3316975 by loze, david.muffley, bohus ulrych: Contextual Link...
istryker’s picture

Status: Needs review » Fixed

#32 works. Committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

douggreen’s picture

This was committed 5 months ago, can you create a new release with it in it?

kobusvw’s picture

Hi #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!

bdunphy’s picture

@istryker - any chance this can be placed in a release? Looking to deploy. Thanks!

anybody’s picture

@istryker this still has no stable release, could you please do it? Thank you!

anybody’s picture

Priority: Normal » Major
handkerchief’s picture

Any news about a new release?

johnpicozzi’s picture

Can 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!