(I tried to post this to the Views Project, but the component list was mismatched to Views and so persistently gave an error.)
I created a very simple Views list of Books on my site (Filter: Book Depth = 1)--an index of books. It is visible to all registered users, but not to anonymous users (who get only a white page). Access is set to "unrestricted." Permissions >> Access All Views is checked for all roles, including anonymous.
This error is very similar to one I reported earlier (node/285066), where the access concerned a list of forms.
I could live without the other functionality, but this poses a very big problem for my content: I obviously want everyone to be able to read the material--and they need an index to do that.
If this can't be fixed, is there some way to hack a permission for a single URL-aliased page or Views-page?
Steve Hays
Ohio University
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | bennybobw_views_export.txt | 3.47 KB | bennybobw |
Comments
Comment #1
Anonymous (not verified) commentedIs it related to http://drupal.org/node/158043?
Comment #2
stevehays commentedPhP error log reveals the following about this bg:
[31-Jul-2008 07:24:09] PHP Fatal error: Cannot access empty property in /Applications/MAMP/htdocs/drupal/sites/default/modules/views/modules/node.views.inc on line 557
which seems to refer to
/**
* Render whatever the data is as a link to the node.
*
* Data should be made XSS safe prior to calling this function.
*/
function render_link($data, $values) {
if (!empty($this->options['link_to_node'])) {
return l($data, "node/" . $values->{$this->aliases['nid']}, array('html' => TRUE));
}
else {
return $data;
}
}
Comment #3
Anonymous (not verified) commentedWhat is calling render_link? My guess is that $this->aliases isn't an array yet.
Comment #4
merlinofchaos commentedDo you have an access control module installed, such as taxonomy access that might seem unrelated to this particular content?
Comment #5
stevehays commentedNo. No modules concerned with access.
Comment #6
merlinofchaos commentedCan you export the view? I don't know what's going on here but maybe I can try to replicate this. I have a feeling that the issue is something with your site, but since I'm not sure where to lay the blame for the data not being visible, I don't know what's going on. It does appear that the white screen may be due to a views crash, but it's the kind of crash that should not be happening.
Comment #7
stevehays commentedI think this is what you want--my best effort at an export. Perhaps I should have saved it as an attachment. If that's the proper protocol, just tell me, and I'll do better in the future.
[Edited to add PHP tags to make the export readable]
Comment #8
bennybobw commentedI'm getting this error too. I do have the Taxonomy Access Control Lite module enabled which writes to the node_access table. However, even after uninstalling the module, it still gives me the error. var_dump of $values gives me
So you're right, no aliases. I hacked it (for now) with
List of modules currently enabled:
cck and cck > text, devel, devel generate, image, image fupload, image gallery, image import, smtp, a custom module (no database stuff though), captcha, recaptcha, taxonomy image, tac_lite (disabled to test, after disabled, node access permissions were rebuilt), views, views_ui, jquery update
Attached is the export of my view. I grepped render_link -- but it didn't come up with anything that seemed useful to me. Just that render() calls render_link(). Let me know if I can help more on this (but I'll be out of town through labor day).
Thanks
Comment #9
merlinofchaos commentedThat allows all users to access all views. I don't think that is what you want. This setting should be checked only for administrators.
Comment #10
merlinofchaos commentedComment #11
merlinofchaos commentedAhh, the render_link call shouldn't be happying for anonymous users. THe problem here is the 'has new content' field which basically does nothing at all if the user is the anonymous user, since there is no such thing is new content to anonymous users. However, a render_link() got stuck outside of the if and it was trying to access data that is not part of the query in this case.
This is now fixed in -dev. If you need a workaround before dev, in views_handler_field_history_user_timestamp::render() move the call to return $this->render_link() up above the } that is just before it.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.