Running the latest dev snapshot of Views on D7.2, any time I click on the 'Edit view' contextual menu when a view is displayed it leads to the wrong URL and results in an "Access denied" error. For example, looking at the view "myview", which includes a single "Content pane" display, the "Edit view" link leads to the URL:
This gives an "Access denied" error in the popup. The correct URL should be:
I should also clarify that the view is being displayed within a Panel pane.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1202048-default_display-redirect.patch | 753 bytes | dawehner |
Comments
Comment #1
dawehnerThe more i think about this bug, i guess the original issue: #1127254: Inline "Edit view" dropdown for block view embedded in theme via views_embed_view returns "You are not authorized" error. is not fixed.
But let's fix it here.
Comment #2
dawehnerThere are two places to solve it
* either don't output 'default' in the link
* or allow to use 'default' as path of the url.
The problem is that if you have configured that not "always show the master display" views_ui_edit_page_display_tabs() returns ][default][#access] = false and so on.
So the question is should the user be able to access the default display or should they be redirected to the first other display.
Personally i would say it should be displayed if it's part of the url.
Comment #3
damienmckennaI'd vote for the first option, to not include '/default' in the URL.
Comment #4
dawehnerearl suggested to redirect the user.
Here is a patch which works for me. Can you please test it as well?
Additional, is there another way to do it without arg() and drupal_goto?
Comment #5
dawehnerHere is the patch. Please always comment asap if there is no patch, because this could lead to double work in .patches are removed.
Comment #6
dawehnerCommited finally. Thanks for reporting the issue.
Comment #7
damienmckenna@dereine: thanks.