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.
According to merlinofchaos, the %views_arg menu loader is only necessary if the argument needs to be validated. Attached patch adds logic to avoid using the menu loader if the related argument doesn't require any validation.
Comment | File | Size | Author |
---|---|---|---|
#2 | 881680-unnecessary-autoloaders.patch | 869 bytes | longwave |
#1 | page_plugin_remove_unecessary_autoloaders-6X-3X-rev2.patch | 1.25 KB | brianV |
page_plugin_remove_unecessary_autoloaders-6X-3X.patch | 1.28 KB | brianV | |
Comments
Comment #1
brianV CreditAttribution: brianV commentedDoh. Text editor inserted the changed code where I thought I told it to overwrite.
Revised patch attached.
Comment #2
longwaveRevised version of the above patch attached. This correctly handles displays with inherited arguments, and also checks the correct "no validation" type, which is "none" instead of "default".
Comment #3
dawehner* Both in views2 and views3 the validate_type is "none".
* Manual testing of the feature worked fine. (checking the menu router item)
* Code looks fine
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedThen use $key in all the places the calculation is used.
The only place that : is a valid value is $value so you shouldn't get any weird combinations that can masquerade as other combinations.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedDisregard #4, wrong issue.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedPatches like this remind me that the project has gotten so big that easy, obvious fixes don't happen just because they're so small I never get to them in the giant pile of things I can do. I know this should happen but when I sit down to work, it never ends up on my plate.
I'm glad someone else did this, because the patch is dirt simple and a good improvement. Applied to all branches.