I have a view, no access restrictions set on it. When I try to view it when *not* logged in, the actual views content doesn't get outputted.

Basically, phptemplate_wrap_content($content) is returning nothing for my view, when not logged in.

Is this a module-wide issue? Can others confirm?

CommentFileSizeAuthor
#12 view_1.txt1.43 KBerapetti

Comments

merlinofchaos’s picture

Is this a problem with views or is your content simply unavailable to anonymous users due to some access control?

I've never had any problems with anonymous users and views.

orionvortex’s picture

I'm having the same problem for my address field at http://chibabeat.com/test_site/?q=/restaurants. For authenticated users it shows the address but for anonymous users it only says "n/a". All of the other fields show up fine on the view except for the address field.

merlinofchaos’s picture

You can use the devel.module and query logging to see what the query that is ultimately generated is; this information might help debug what's going on.

orionvortex’s picture

Ok I have the query showing up now but it is basically useless for me since I haven't the slightest idea what it means. If you look at the page now you should see the log and maybe you can tell. Sorry but this is beyond me.

merlinofchaos’s picture

Well I looked at the query, which for reference is this:

SELECT node.nid, node.title AS node_title, node.changed AS node_changed, node_data_field_closest_station_2.field_closest_station_2_value AS node_data_field_closest_station_2_field_closest_station_2_value, node_data_field_food_type.field_food_type_value AS node_data_field_food_type_field_food_type_value, node_data_field_address_2.field_address_2_value AS node_data_field_address_2_field_address_2_value, node_data_field_address_2.field_address_2_format AS node_data_field_address_2_field_address_2_format FROM node node LEFT JOIN node_content_restaurant_cafe_etc node_data_field_closest_station_2 ON node.vid = node_data_field_closest_station_2.vid LEFT JOIN node_content_restaurant_cafe_etc node_data_field_food_type ON node.vid = node_data_field_food_type.vid LEFT JOIN node_content_restaurant_cafe_etc node_data_field_address_2 ON node.vid = node_data_field_address_2.vid WHERE (node.type IN ('content_restaurant_cafe_etc')) ORDER BY node.title ASC LIMIT 0, 15

...and it looks fine to me, there isn't a node access issue causing it. Is this maybe a CCK bug? As far as I can tell that query is properly formed and if it's wrong, it's likely CCK's fault.

merlinofchaos’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.x-dev » 4.7.x-1.x-dev
Component: Code » text.module

Note: As I look at that query, I think it may be an issue with CCK and using check_markup improperly.

Sending this over there.

[For reference, it's only the address field that comes up n/a when viewing as anonymous.]

karens’s picture

If this is still a problem, we need to know what type of field is causing the problem, plus any other relevant info about how the field was set up. Also be sure that the cache has been cleared and that the content modules are current and that you have done any updates that are needed, since the database configuration changed recently and that could keep content from being accessible.

DaveNotik’s picture

Upgraded Views from .141 to .159 (latest 4.7), and brought CCK to latest too. Same thing.

I have a view, no permissions set.

I have a page-people.tpl.php to create a custom look for that page, which gets picked up fine.

There, I output the content as with a regular page.tpl.php:

print phptemplate_wrap_content($content)

I turned on devel.module debug output for anonymous users. You can see it for yourself at http://staging.dpanel.org/people.

Cache is disabled.

Seems like a Views issue to me, though may be CCK, may even be another module like Nodeprofile (updated that too).

karens’s picture

I'm not sure these two are experiencing the same problem. Dave's query (viewed on the link he provided) indicates that he is using both usernode and organic groups. Dave, since you only have trouble when viewing as anonymous user, I'd start by seeing what happens if you turn the Organic Groups access control off. I would also try to see what happens if you leave usernode off. I'm not sure this is anything at all to do with CCK.

The other issue was something about an address field, but I still don't know what kind of field that is, and I need to know that to have even an idea of where to start looking for this.

erapetti’s picture

I have the same problem: the view does not show text fields for anonymous users if using List View, although it shows in Full Node views. The node display is okay in both cases.

I'm not using OG nor usernode. The view access is enabled.

My text.module is v 1.32.2.12 2006/11/15 13:28:58
My views.module is v 1.159.2.15 2006/11/15 16:52:16

Seems to be a bug where access permissions are verified for text.module.

karens’s picture

If you're using a text field, is it a textarea that uses a filter? If so, what filter are you using?

erapetti’s picture

StatusFileSize
new1.43 KB

Even having no filters and no sort criteria the problem arises.

Attached is the view export.

karens’s picture

I'm not talking about your views filter, I'm talking about the text input filter. What input filter are you using?

cp2boston’s picture

I was seeing the same problem. If my view was set to display Full Text, it showed up for Anonymous, but if it was set to List or Table I would get N/A. I was using the URLFILTER Module for the text input mode. When I changed the text input to Filtered HTML, the problem went away.

RayZ’s picture

I've opened a new issue at http://drupal.org/node/102357 for what @orionvortex, @erapetti and @cp2boston mention since I'm seeing it too, and I agree that it is different from the original one reported here.

erapetti’s picture

RayZ posting lead me to try enabling access for the Anonious User to the input filter "Full HTML" which I was using for the content in the text field, and that solved the problem.

I mean, this is still a bug in views.module because it checks the access permissions to the filter when rendering the page... but al least there's a workaround until this get fixed.

merlinofchaos’s picture

If it's a CCK field, it's CCK that's doing the access check on the filter, not Views.

RayZ’s picture

Ahem ... http://drupal.org/node/102357 was created for followups to the issue about "filtered text field showing 'n/a' for anonymous users in list view". Now, back to @DaveNotik's original issue here (forgive the hijacking).

@DaveNotik, did you ever find a resolution? If so, please close this one.

karens’s picture

Since the last post on this thread, the related issue http://drupal.org/node/102357 was marked as a duplicate of yet another issue, and those issues should now be fixed, so possibly this issue is also fixed if it wasn't already. Dave, can you see if you still have problems with the latest code? If not, let's mark this fixed.

karens’s picture

Status: Active » Fixed

This issue turned into a conglomeration of all different things that might or might not have anything to do with each other and might or might not have been fixed in the considerable time since this was first posted, especially since both CCK and Views have had lots updates in the meantime. It's hard to know if there is still an outstanding issue here or not and what it might be, so I'm just going to mark this as fixed and we'll start clean if someone runs into other problems.

Anonymous’s picture

Status: Fixed » Closed (fixed)