I've scoured the support threads here (and elsewhere) and can't seem to find a resolution for this. The error message below appears on every page of my site when I enable the taxonomy_term view:

warning: Invalid argument supplied for foreach() in /includes/common.inc on line 1647.

When I disable the view, the error goes away; however, I need this view so resolving this issue is critical.

I am not using Taxonomy Menu (although I installed it an enabled it just to see if doing so would solve the issue as described here.)

Other contributed modules I am using:

CCK
Global Redirect
Path redirect
Pathauto
Token
Transliteration
URL alter
Wysiwyg
Views Carousel
Views exporter
Views UI

At this point, I'm at a loss... any assistance here would be incredibly helpful...

Comments

dawehner’s picture

Priority: Critical » Normal

For me critical is wsod.

epiphanymarketing’s picture

Apologies.

Thoughts?

babruix’s picture

+1
I have same problem when enabling taxonomy_term view.. Any ideas?

keinstein’s picture

Status: Active » Needs review
StatusFileSize
new535 bytes

The error is in sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc in line 73.

        $tids = new stdClass();
        $tids->value = $argument;
        $tids = views_break_phrase($argument, $tids);

The given attribute “value” prevents views_break_phrase to recreate it. On the other hand views_break_prase will construct an stdClass() object if it is not given as second argument. So we can reduce this three lines to the following:


$tids = views_break_phrase($argument);

dawehner’s picture

Somewhere thre should be another issue to exact this problem. There is a patch included for a simpletest for this.

I would be happy if this could be found and then be commited addtional.

epiphanymarketing’s picture

This solved the problem for me. Thank you!

keinstein’s picture

Related issues contain
#319425 (won't fix)
#411566 (another patch and solution)
#407538
#327307

but I didn't find a test.

skessler’s picture

I am using views 6.x-2.10 and the problem still exists. Will this patch work for 2.10? What needs to happen to bring this into a release.

dawehner’s picture

Try the patch. test the patch. And review the patch. Thats what you can do.

skessler’s picture

When I try the patch I get:

* warning: Missing argument 2 for views_break_phrase(), called in /home3/jewishmo/public_html/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 73 and defined in /home3/jewishmo/public_html/sites/all/modules/views/includes/handlers.inc on line 788.
* warning: Missing argument 2 for views_break_phrase(), called in /home3/jewishmo/public_html/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 73 and defined in /home3/jewishmo/public_html/sites/all/modules/views/includes/handlers.inc on line 788.
* warning: Missing argument 2 for views_break_phrase(), called in /home3/jewishmo/public_html/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 73 and defined in /home3/jewishmo/public_html/sites/all/modules/views/includes/handlers.inc on line 788.
* warning: Missing argument 2 for views_break_phrase(), called in /home3/jewishmo/public_html/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc on line 73 and defined in /home3/jewishmo/public_html/sites/all/modules/views/includes/handlers.inc on line 788.

Thanks for the help.

keinstein’s picture

can you tell, which views version you using?

In my installation the function views_break_phrase() is defined as

function views_break_phrase($str, $filter = NULL) {

I'm using Views 6.x-2.8
Update: The patch is for 6.x-2.10. My local copy of views was slightly outdated.

skessler’s picture

6.x-2.10

ewing007’s picture

I'[m having the same problem as denverdataman in #10. after applying the patch I have even more error messages than before.

I read with taxanomy menu that it's enough to rebuild it but I couldn't find how to do it. I ran cron as well but that didn't help.

Any thoughts?

Views 6.x-2.10

merlinofchaos’s picture

You can rebuild menus by visiting the modules page and clicking the submit button.

suffering drupal’s picture

I have the "Invalid argument ..." problem too, line 1651 (appears 4 times)
Tried to solve with the patch, but got the same error message as #10 (7 times)
Undid the patch, problem back of course

Drupal 6.17
views 6.x-2.11
taxonomy_term view enabled
not using Taxonomy Menu module

And yes, when not using the taxonomy_term block, error messages disappears!
Tried with a clone of this block just in case, but gives the messages too.

pixel8r’s picture

Has anyone ever been able to figure out issue? The error comes up "only" when enabling taxonomy_term view.

Drupal 6.19
views 6.x-2.11
taxonomy_term view enabled
taxonomy terms listed in a block by a *term* type view <- that's when the error appeared.
not using Taxonomy Menu module

There must be some incompatibility because I have this error only on one of my sites.

merlinofchaos’s picture

Status: Needs review » Postponed (maintainer needs more info)

Well, the patch can't work the way views_break_phrase() is set up.

I'm unable to reproduce this, so without clear reproduction instructions (like, from a base Drupal install) I'm not sure what to suggest. There's clearly some other module interfering or othewise setting up the conditions for this, but I don't know what it might be.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

unable to reproduce, no activity for 30 days