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.
I tried to create an access plugin for a page view and noticed that it would fail and grant access if the function that is used to check for access is defined inside the plugin itself and not in a module, ie it is not accessible to the menu system.
IMO at the very least there should be a watchdog entry or just a PHP error.
Comment | File | Size | Author |
---|---|---|---|
#5 | silent_failing_access_callback-2208203-5.patch | 968 bytes | sachin_s |
Comments
Comment #1
dawehnerLet's mark it as novice issue to get someone to work on it.
Comment #2
sachin_s CreditAttribution: sachin_s commentedI will create a patch for this.
Comment #3
sachin_s CreditAttribution: sachin_s commentedThe patch logs a message to identify the unavailable access callback.
I was kind of confused on whether to use trigger_error() php function or the vpr() debugging function provided by views module. The vpr() requires devel module to be enabled. Finally, I decided to go with the vpr() because it has already been used in the views module at other places for the debugging purpose.
Also, there is no 7.x-3.x-dev branch for views module in git, so I created the patch against 7.x-3.x branch. Not sure if I need to change the version of the issue to reflect this.
Please review. Thanks.
Comment #4
sachin_s CreditAttribution: sachin_s commentedComment #5
sachin_s CreditAttribution: sachin_s commentedAdding a new patch to fix the indentation.
Comment #6
sachin_s CreditAttribution: sachin_s commentedSomeone got time to review the patch?
Comment #7
markie CreditAttribution: markie commentedtesting
Comment #8
markie CreditAttribution: markie commentedWell heck.. I was looking at D8.. I will test this later this week. Sorry.
Comment #9
Chris Matthews CreditAttribution: Chris Matthews commentedThe 5 year old patch in #5 to views.module applied cleanly to the latest views 7.x-3.x-dev, but still needs review.