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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Issue tags: +Novice

Let's mark it as novice issue to get someone to work on it.

sachin_s’s picture

Assigned: Unassigned » sachin_s

I will create a patch for this.

sachin_s’s picture

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

sachin_s’s picture

Assigned: sachin_s » Unassigned
Status: Active » Needs review
sachin_s’s picture

Adding a new patch to fix the indentation.

sachin_s’s picture

Someone got time to review the patch?

markie’s picture

testing

markie’s picture

Well heck.. I was looking at D8.. I will test this later this week. Sorry.

Chris Matthews’s picture

The 5 year old patch in #5 to views.module applied cleanly to the latest views 7.x-3.x-dev, but still needs review.