I have a problem with part of a view not showing up for anonymous users. I believe this to be an Views issue, because the HTML isn't even being produced for Anonymous. So I have an ImageField that I've selected as one of my fields to display as a link. When a user is logged in, they can see the picture, and the HTML is there, but the HTML and the picture is not there for anonymous users.
Any help you can provide would be appreciated.
Drupal 6.9
Image 6.x-1.0-alpha4
ImageCache 6.x-2.0-beta5
ImageField 6.x-3.0-alpha4
$view = new view;
$view->name = 'Making_a_difference';
$view->description = 'making a difference';
$view->tag = 'making a difference';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Making a Difference', 'default');
$handler->override_option('fields', array(
'field_headimage_fid' => array(
'label' => '',
'link_to_node' => 1,
'label_type' => 'none',
'format' => 'making_difference_default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_headimage_fid',
'table' => 'node_data_field_headimage',
'field' => 'field_headimage_fid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'title' => array(
'label' => 'Title',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'blog' => 'blog',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Making a Difference');
$handler->override_option('items_per_page', 3);
$handler->override_option('distinct', 1);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', 'Making a Difference');
$handler->override_option('block_caching', -1);
Comments
Comment #1
primalmedia commentedI get the same problem with another view: The HTML for the image does not appear for anonymous users.
Comment #2
primalmedia commentedI'd just like to add that ImageField and ImageCache and Views work correctly on every other part of the site, just not when ImageField is called as a Field.
Comment #3
drewish commentedare you using public or private file transfers?
Comment #4
drewish commentedComment #5
drewish commenteddid you set the permissions on the default or just over ride it on the displays?
Comment #6
primalmedia commentedHi Andrew,
I met you at Boston DrupalCon. Thank you for helping me out here.
I'm using public file transfers. I'm not sure what you mean about setting the permissions, or overriding it on the display.
Comment #7
primalmedia commentedI'm still looking for help with this if anyone has any insight or has experienced the same problem.
Comment #8
rezboom commentedSame problem here:
I have a view I would like to show to anonymous users:
The view is supposed to display 3 fields:
Logo, name of organisation, description of organisation
Only "name of organisation" is displayed, though.
Logo is an IMCE image
description is a text area (multiple rows)
"Access" (Permission) for this view is set to "unrestricted", both on default and on display "page"
Views is 6.x-2.x-dev from 2009-Feb-01
Grateful to anybody who can advise. Thanks!
Comment #9
primalmedia commentedComment #10
merlinofchaos commentedThere are no critical support requests.
Please note that CCK has its own field permissions system, so be sure to check that as well.
If the problem you're having is only with CCK fields, then you really should file your request against CCK since that's what the issue submission guidelines for the Views queue tell you to do. I really wish people would read that and do that, since I have no control over how fields from modules are rendered.
I'm going ot won't fix this; please file your issue in the appropriate place.
Comment #11
primalmedia commentedMerlin,
You are an egocentric arrogant asshole. If you can't be helpful, why don't you get out of the way.
This problem is Active. Why don't you attempt to simulate the problem as outlined above, and then reply with a helpful answer, or don't reply at all!
GFY!
Adam
Comment #12
drewish commentedadam, the only egocentric arrogant asshole in this queue is you. try contributing something other than bile for once.
Comment #13
michelle@primalmedia: Wow, I am just completely stunned at your response. Earl has given so much to Drupal, far beyond what his job pays him for, I'm sure. He is an amazing asset to the community. And he is totally right. You need to file issues in the proper queue. A project's queue is the responsibility of its maintainer. He has every right to set something to won't fix if it is not something that he can or will fix. You need to respect his decision and learn how to behave in this community.
Michelle
Comment #14
merlinofchaos commentedI'm willing to accept the label of egocentric asshole, but at the same time you have to accept the label of fucking idiot. The solution to your problem is in your hands. I can see from the queries that are run and the view that is run exactly what is wrong, and you just plain refuse to believe me.
Now, let's see, who knows this software better?
Are you sure I am the egocentric asshole?
Oh and FYI, egocentric asshole that I am, I am shutting down this thread entirely, because it is just going to devolve into more namecalling.
Comment #15
merlinofchaos commentedI just reread the issue and realized I'm responding to the wrong one, slightly. First, my apologies, though my answer is actually roughly correct. However it's correct for a different reason.
First, from the issue submission guidelines:
I'm really sick of 1) people who refuse to read that, and more importantly, 2) people who read that and then assume that for some magical reason, *their* problem that only affects CCK fields must be a Views problem because of [insert bogus reason here].
You fall into the latter category, based on the opening paragraph of your sentence, which loops back into my previous response.
Comment #16
Buddharide commentedI'm having this problem too. The HTML for the view is not appearing for anonymous users.
Comment #17
rezboom commentedmerlinofchaos - you rock and drupal would not be the same without you! we (the "end"users) are only able to build drupal sites because we stand on the shoulders of giants, like yours truly.
as merlin said, it is very likely that you did not set your permissions correctly - just look at the permissions table and make sure that anonymous users are allowed to view the fields you would like them to see.
worked perfectly for me.
Comment #18
Buddharide commentedThanks, it does not appear to be a permissions thing. I've checked everything, and still cannot get the HTML to appear for Anon users. If it worked for you, could you tell us what versions of ImageField and Views are you using?
Comment #19
merlinofchaos commentedThe one common thread here: So far everyone has reported the problem only happens for fields of type ImageField. Because modules are responsible for the output of their fields, you really need to take up this conversation in the imagefield queue.
Comment #20
superjuggler commentedtry going to /admin/user/permissions. most likely there are no anony permissions checked for view field_xxxxx or something thereabouts. I'll stop now since this is probably the wrong place to continue this discussion.
Comment #21
drewish commentedodds are it's actually imagecache permissions that need to be set.
Comment #22
Buddharide commentedPermissions did not solve the problem, but upgrading Views to 6.2.3 did solve the problem. Don't know why the upgrade made any difference, but that's what solved it. Thanks for your suggestions.
Comment #23
stevethewebguy commentedI had this same problem. I was able to fix it by going into CCK and adding "anonymous user" to the "view" (not edit, of course) permissions for those fields.
admin/user/permissions
Hope this helps.
Comment #24
emdalton commentedI had a similar problem and was able to fix it by going through the fields that appear within the view and setting all their permissions to allow anonymous users to view them (thanks to the hints above). This leads me to suspect that the problem is somewhere in Content Permissions (now part of CCK in Drupal 6.x, but formerly a separate module in 5.x). I am reopening this and assigning it to that project as a bug.
Note that some of my views worked just fine, and even though the view with the problem had images in it, just enabling anonymous users to view the images didn't resolve the problem. I enabled all the fields in that view, because I don't have time right now to fiddle around trying to figure out which one is causing the problem. However, if a CCK maintainer takes this bug on, I'll be happy to work with them to help determine where exactly the problem lies.
Comment #25
markus_petrux commentedAs soon as you enable the Content Permissions module, you should grant permissions explicitly, for all fields. Otherwise, no one is allowed to view any field, by default. That's how it works.
Comment #27
tvu007007 commentedThere's also another catch, make sure you set your file system to Public, otherwise the Views and Imagefields will output urls with the following:
Note: the "/default/" is used in the img src path when setting the filesytem to public.
ie.
http://localhost/system/files/logos/logo_infogroup_0.png?1278046065
where when set to public, anonymous users can access and the urls change to:
ie.
http://localhost/default/files/logos/logo_infogroup_0.png?1278046065
Download method:
Public - files are available using HTTP directly. ------- I have this set to on
Private - files are transferred by Drupal.