Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2014 at 21:51 UTC
Updated:
31 May 2014 at 05:18 UTC
Jump to comment: Most recent
Comments
Comment #1
bakedbeanjk commentedI also get a similar message, this error msg appeared just after I upgraded the core application to 7.26
Notice: Array to string conversion in views_arg_load() (line 475 of /home3/[deleted by me]/public_html/sites/all/modules/views/views.module). I've searched on this site but cannot seem to find anything that would help, unless of course I'm searching properly
I'm not a PHP developer so is there anyone who can help?
Thanks
Comment #2
bakedbeanjk commentedI found the views.module and extracted the line of code but do not really understand, anyone who can? I appreciate that the message refers to views argument but I haven't amended any views recently and before the upgrade there wasn't a problem ie no error msgs
function views_arg_load($value, $name, $display_id, $index) {
static $views = array();
// Make sure we haven't already loaded this views argument for a similar menu
// item elsewhere.
$key = $name . ':' . $display_id . ':' . $value . ':' . $index;
if (isset($views[$key])) {
return $views[$key];
}
Comment #3
wgsimon commentedIt appears that
views_arg_loadis being passed an array when it's expecting a string. As a stop-gap you can stick an@in front of line 472 to hide the error message but this doesn't solve the underlying problem:@$key = $name . ':' . $display_id . ':' . $value . ':' . $index;Comment #4
wgsimon commentedDuplicate of Array to string conversion in views_arg_load.
Comment #5
bakedbeanjk commentedHi wgsimon
Apologies if I don't fully understand #4, I am not sure what to do with the information on that page except to follow the post for further information - it does go to some extent explains what might be happening. Thanks for replying anyway. I might use #3 as a temporary measure. I sent a technical help desk ticket to my web hosting service provider in case the error messages were to do with PHP5.4. His reply was
##############
According to php.net the message that's being displayed is only an E_NOTICE type error which means it isn't causing any problems and nothing is malfunctioning. For more details on what it means and why PHP 5.4 is resulting in those warning please see this PHP.net page: http://www.php.net/manual/en/migration54.incompatible.php
##############
So it's an annoying error msg but not critical
cheers
Comment #6
wgsimon commentedComment #4 just means that someone else had this problem before, though they didn't solve it. The suggestion in comment #3 is in line with the advice given by your service provider as the
@is just hiding the error message.Comment #7
bakedbeanjk commentedOk, thanks for your advice to simply hide the annoying error messages
Comment #8
bakedbeanjk commentedThere is one question, even though I will add the @ (#3) should I delete the @ at some point eg when the error messages is resolved in the future or is it OK to just leave the @ in place permanently, I guess not?
Comment #9
wgsimon commentedI would only leave the @ there as an emergency measure and suggest removing it as soon as you can.
Comment #10
darrellduane commentedThe problem is that $display_id is being set as an array. I saw this in my installation:
I added:
at the beginning of
and this fixed the issue, although there is still some underlying concern as to why views_arg_load() is receiving an array as the $display_id, not sure if this is supposed to happen or not.
Comment #11
bakedbeanjk commentedThanks, I will have a go
Comment #12
jeff h commentedI had this error too; it was caused by having two views with the same URL path.
In my case, I had defined a view which hijacked /taxonomy/term/% but I also had the default view "Taxonomy term" turned on. The latter also responds at /taxonomy/term/%. As soon as I turned the built-in view off, the errors went away.
Comment #13
green monkey commented? ... could Views Support - please offer comment on this issue and suggestions
Comment #14
green monkey commented#12 from above where the work around is to turn off
the Views version of /taxonomy/term/% .... this works
but what I want to use the Views version and turn off the Core version - how is this done?
Comment #15
dqd#13
??
Dear @tweaker, I hope you don't get me wrong, but I think there is a misunderstanding with your usage of the Drupal software and the modules: there is no views "Support", tweaker, unless you have another paid service at your hand, from which I don't know. This is a free community driven module. The support on it is you and me and the others here in the issue queues.
This issue has been marked as duplicate of #1924892: Array to string conversion in views_arg_load and will be closed.
@tweaker. You can simply disable the regarding views view in your
admin/structure/viewsoverview, if you want, and then clear the cache. Drupal should fall back to its default term view then for you, if it is that what you have asked for.