I have created a node view so that I can list my own content type called properties. I seem to have done everything right (analysis doesn't throw up any problems) and when I'm in administrator view the view works fine.
However when I try to look at it as an anonymous user I just get a red box that says this " warning: Invalid argument supplied for foreach() in /hsphere/local/home/staging/landj.staging.eurekastep.com/modules/views/theme/views-view-fields.tpl.php on line 22. " four times.
I haven't a clue what to do with this, and I really need this view to work (soon). If anyone could help me (I have little experience with code btw) I'd be totally grateful
Sammy
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views_export_current_productions.txt | 3.31 KB | justafish |
| #5 | views_export_past_productions.txt | 3.67 KB | justafish |
| #5 | views_export_production_reviews.txt | 3.12 KB | justafish |
| #5 | views_export_review.txt | 2.64 KB | justafish |
Comments
Comment #1
merlinofchaos commentedCan you please export the view that does this? I can't really do much with just the error message.
Comment #2
merlinofchaos commentedComment #3
eLiTeGuRu commentedI have the same issue.
My exported view is:
$view = new view;
$view->name = 'links_religion';
$view->description = 'links';
$view->tag = '';
$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', 'Defaults', 'default');
$handler->override_option('fields', array(
'field_link_url' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_link_url',
'table' => 'node_data_field_link',
'field' => 'field_link_url',
'relationship' => 'none',
),
'field_desc_value' => array(
'label' => '',
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_desc_value',
'table' => 'node_data_field_desc',
'field' => 'field_desc_value',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'created' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'links_religion' => 'links_religion',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler->override_option('row_options', array(
'inline' => array(
'field_link_url' => 'field_link_url',
'field_desc_value' => 'field_desc_value',
),
'separator' => '-',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'Messages_FramrozePatel');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
Thanks, any help is appreciated
Comment #4
eLiTeGuRu commentedComment #5
justafishI have the same problem for every view I've made. I get the same error each time saying:
Once for each view field that I should be seeing.
I've attached exports of all my views.
Comment #6
merlinofchaos commentedCan you please export the view?
Comment #7
eLiTeGuRu commentedI thought I exported it in post #3, did I do something wrong?
Comment #8
justafishas had I...
Comment #9
merlinofchaos commentedWhoa, sorry. That message went onto the wrong post.
(Heh. I have to say it a lot).
Comment #10
kriskd commentedI just had the same thing happen to me. No error when viewing while logged in, but I get the error when logged out. What I'm attempting to do is display images from an imagefield. Here is my View:
Comment #11
eLiTeGuRu commentedI finally was able to fix this issue. Apparently, anonymous users didn't have access to view the fields.
Steps:
1. Administer
2. Permissions (Under User Management)
3. Looks for your fields (Under content_permissions module)
4. Give anonymous the privilege to view the field.
Hope this helps others.
Comment #12
kriskd commentedOh my gosh -- I feel silly! That was totally my issue!
I marked this as "fixed". Hope that is okay with the original poster, otherwise I'm sure it can be opened again. :)
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.