If the view access is unrestricted and the users does not have "access content" permission, then an error is displayed in ajax view when using sort, pagination or filter functionality..
$items['views/ajax'] = array(
...
'access callback' => 'user_access',
'access arguments' => array('access content'),
...
);
The views module uses "access content" as the permission for the "/views/ajax" menu item - so the ajax callback is getting an access denied response.
repro:
1. remove "access content" permission for anonymous user
2. create a view
- Style: Table (with sortable header)
- Use AJAX: Yes
- Access: Unrestricted
and add block display
3. put the block into region (and display it on every page)
4. logout
5. click on the table header in the view.
result: "An error occurred at /views/ajax."
Comment | File | Size | Author |
---|---|---|---|
#1 | views-408894.patch | 740 bytes | dawehner |
Comments
Comment #1
dawehnerthis patch solves the problem.
Comment #2
dawehnerUpdate status.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedMakes sense. Committed to both branches.