Hello everyone,
I've been using views for months now. And since almost the beginning I have got this error that just now I am trying to resolve (was no priority before). The problem is this:
Every time I access a specific view in my site (does not happen with every view), the following errors appear:
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/face4pet/public_html/sites/all/modules/views/plugins/views_plugin_style.inc).
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/face4pet/public_html/sites/all/modules/views/plugins/views_plugin_style.inc).
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/face4pet/public_html/sites/all/modules/views/plugins/views_plugin_style.inc).
Warning: preg_split() expects parameter 2 to be string, array given in _filter_url() (line 1428 of /home/face4pet/public_html/modules/filter/filter.module).
Everything works good, it is just annoying that the messages show.
Is there any way to remove these errors (by solving them or just hiding them :P)?
Please, let me know any options
Thanks in advance
PD: You can access the website with the view here: http://face4pet.com/lista_mascotas
Comments
Comment #1
rhouse commentedDitto.
But you are mistaken: when this error happens, the selected view is missing data. One sequence that produced it for me:
Select a restriction (e.g. number greater than 2), apply. Then tighten the restriction (e.g. number greater than 3), then apply. The error appears.
Comment #2
avo_liao commentedI am trying various filters and all seems to work correctly...
The error appears when I try to edit the view and when I open the page that contains it, but it doesn't appear when I execute the view.
What that the error refers to? How can I fix it?
Thanks
Comment #3
rhouse commentedI am marking this critical because it happens every time the reset button is clicked and it leaves an empty result set, which completely messes up the user's experience.
Comment #4
dawehnerIn general there are not so many people which have this bug, so it's probably not such critical.
Additional please try to help to reproduce the problem, therefore read: http://drupal.org/node/571990
A bug without a good report is quite ueseless.
Comment #5
rhouse commentedThank you for your feedback. I am not sure how to get the information that will be helpful for you. Here is the exact text printed for me:
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/gitie/public_html/bunyamts/sites/all/modules/views/plugins/views_plugin_style.inc).
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/gitie/public_html/bunyamts/sites/all/modules/views/plugins/views_plugin_style.inc).
Notice: Array to string conversion in views_plugin_style->tokenize_value() (line 125 of /home/gitie/public_html/bunyamts/sites/all/modules/views/plugins/views_plugin_style.inc).
Warning: preg_split() expects parameter 2 to be string, array given in _filter_url() (line 1428 of /home/gitie/public_html/bunyamts/modules/filter/filter.module).
This happens on the search page when I click RESET to reset the search filters. The only module I had installed that is out of the ordinary is Content Templates. I turned it off and got the exact same result, except that the actual teaser display was different because it was no longer re-templated. I read your help page above, but I couldn't understand this instruction: "Views provides the ability to list data - if your data is provided by a module other than Drupal Core, please enter your issue in that module's issue queue instead." What does that mean? The data is in nodes with extra fields defined by me, but standard nodes just the same. How do I find out which module is "providing" this data? If I can get past that step, I can probably get you more specific information about the problem. Many thanks!
Comment #6
dawehnerHey, thanks for not reading the text. Do you think we can reproduce the bug automatically when you post this error message?
Comment #7
rhouse commentedAs I said before: I read your help page above, but I couldn't understand this instruction: "Views provides the ability to list data - if your data is provided by a module other than Drupal Core, please enter your issue in that module's issue queue instead." What does that mean?
That is, I DID read your text but I can't understand it. What is so bad about asking for clarification?
To ask that question more specifically: What qualifies as a module "other than Drupal Core" "providing" data? Does that mean one can have no other module except core and views installed? What does it mean? Not everyone understands the innards as well as you. I understand that you get a lot of silly questions, but it doesn't help your cause if you go agro the instant people who are trying to understand and get you what you need ask you a simple question.
Comment #8
avo_liao commentedI agree with rhouse. I would love to repoduce the problem but it is hard to understand how.
Comment #9
rhouse commentedHi avo_liao, thank you. I am very willing, if I possibly can, to help find and fix this bug. (I have fixed a few in other modules in the past few weeks.) But I ran into an instruction that makes me unsure whether I am proceeding in the right direction. Rather than blunder along and do something that is completely unhelpful, I asked for clarification. If/when I get it, I'll do the hard yards to either discover the bug or get a reproducible bug setup.
Comment #10
rhouse commentedTo anyone else having trouble here: I have noticed I see this bug when I have a search on node title and it goes away when I don't. Is that the same for you?
Comment #11
avo_liao commentedHmm I do have a search on node title with an error, however I have another view that also searches for node title and it does not shows error.
BUT, I found that changing the exposed form style from "Input required" to "Basic" makes the error dissapear.
Hooray!
Comment #12
stella commentedA little bit more information. When I debug tokenize_value() and check what $value contains (supposedly a string), it contains this array structure:
I need to debug a bit more, though difficult when you can't edit the view to see your settings, but from what I remember this is the text to be displayed when someone submits the exposed filters form without filling in the required values. I know the exposed filters are in a block, with "input required" setting and I'm definitely using at least one OR group. This used to work, so I'm guessing some default setting shared between displays might have changed, maybe... will keep researching.
Comment #13
stella commentedOn one test site I couldn't even edit the view when the above error appeared, but on my local dev server, I was still able to edit the view even with the error, weird.
Anyway, this allowed me to poke around at the field settings. In the 'input required' settings dialog, the text for 'Text on demand' (ie. text displayed when no exposed filters entered) was appearing as empty. This is despite the fact that I could see it in my debug print statement and it was in the exported view code. I went ahead and restored those settings via the UI, saved the view and re-exported. Here's the git diff between the before and after views export in case it helps:
For me this error probably started happening when a colleague of mine upgraded from the 7.x-3.x-dev version to the recently released 7.x-3.0-rc1 while I was out of the office.
The above error is fixed for me now.
Comment #14
dawehnerIt would probably help if you could write something like
in the beginning of this function.
Comment #15
esmerel commented