Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
So this is a relatively specific bug. I think the title says it all. "Custom Views Access Plugin will not replace integer with argument if view is a default tab creating a new parent menu tab".
Switch to a default tab with an existing menu item, no problem.
Switch to a current tab with an existing menu item, no problem.
But, switch to a default tab where it creates a prent item, and it passes "0" or "1" instead of "node" and "nid".
Thanks for looking at this! The argument replacement function of views access plugins are very handy.
Comments
Comment #1
dawehnerEven you don't believe it it is always handy if you provide a view export which is really easy to reproduce :)
Comment #2
nagiek CreditAttribution: nagiek commentedSorry I have a bad habit of that... :)
There's a custom function in the access callback, but you can just set it to anything to check the arg that's being pushed through.
Comment #3
nagiek CreditAttribution: nagiek commentedSo here's what I believe is the problem. No patch because my computer is in the shop... :p
Here is the code in
views_plugin_display_page.inc
that replaces integers with dynamic arguments:$access_arguments
is then registered for later.BUT, when creating a new menu tab, we don't pass in the
$access_arguments
.If we pass in
$access_arguments
, my problem should be fixed :) and views will be so much the better.Again, sorry no patch. Thanks dereine!
Comment #4
nagiek CreditAttribution: nagiek commentedComment #5
dawehnerOh it's so much easier to understand what you change if you create a patch file.
Comment #6
nagiek CreditAttribution: nagiek commentedJust last line.
Will post patch when I get my computer back (should be today)!
Comment #7
dawehnerIt's all about context :) Anyway i found the line so changed it and commited to both 3.x branch.
Thanks for providing a "patch"...
Comment #8
nagiek CreditAttribution: nagiek commentedThanks. :) Sorry I wasn't more help.