Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I changed two taxonomy terms aliases to single words, and then got the following errors when trying to view the contents of a term of a vocabulary (for instance ...taxonomy/term/48):
1.
* warning: Invalid argument supplied for foreach() in ...handlers.inc on line 794.
2.
* warning: Invalid argument supplied for foreach() in ...common.inc on line 1593.
3.
* warning: Invalid argument supplied for foreach() in ...handlers.inc on line 794.
4.
* warning: Invalid argument supplied for foreach() in ...common.inc on line 1593.
5.
* warning: Invalid argument supplied for foreach() in ...handlers.inc on line 794.
6.
* warning: Invalid argument supplied for foreach() ...handlers.inc on line 794.
7.
* warning: Invalid argument supplied for foreach() in ...common.inc on line 1593.
8.
* warning: Invalid argument supplied for foreach() in ...handlers.inc on line 794.
9.
* warning: Invalid argument supplied for foreach() in ...handlers.inc on line 794.
10.
* warning: Invalid argument supplied for foreach() in ...common.inc on line 1593.
I tried changing the aliases in question, and I also disabled the pathauto module, but the errors still remain.
Help!
Comments
Comment #1
sam.e2 CreditAttribution: sam.e2 commentedHere are the extended urls given in the error messages. They all relate to one or other of these:
/modules/views/includes/handlers.inc
/includes/common.inc
Comment #2
Freso CreditAttribution: Freso commentedIf the error persists after disabling Pathauto, it's probably not Pathauto causing them. Also, it's Views being referenced in the error messages, not Pathauto - so kicking over to Views.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedIs this the bug where pathauto was creating aliases to taxonomy/term/ incorrectly? Check your url_alias table and see.
Comment #4
gregglesYes, we'll need to know the "src" and "dst" columns from the url_alias table for the paths that cause this problem.
@merlinofchaos - I'm aware that in the past Pathauto and Views didn't work well together for taxonomy/term/TID/0/feed issues, but Pathauto now exposes control over the "0/feed" part of that. I think Views also has support for "0/feed" style items. If there is some other integration point that is weak then let me know so we can fix it.
Comment #5
sam.e2 CreditAttribution: sam.e2 commentedHere it is:
Fair enough, but the error only came about after I changed an alias in pathauto. The error may now lie in views somewhere, but it was initiated by pathauto, as far as I can tell.
Thanks everyone for your help!
Comment #6
gregglesWhat is your pattern for taxonomies?
There is something wrong with those aliases. You'll need to delete them out and start over, probably after fixing your pattern and also upgrading to 6.x-1.x-dev (there was a bug in 6.x-1.1 that causes this specific error.
Comment #7
sam.e2 CreditAttribution: sam.e2 commentedThanks very much greggles - you saved my site! :)
I installed 6.x-1.x-dev, and then deleted the entries in the url_alias table via phpma. After that the normal categories and links worked again, and I was able to carefully create new aliases using patauto, and bulk update the existing ones.
Thus the problem is now solved for me.
Presumably it was caused by me entering aliases that were not specific enough to lead to an individual page, by mistake when I was originally configuring pathauto.
I found it quite an easy mistake to make, but hopefully this issue will help any others using the stable version of pathauto who encounter a similar problem.
Thanks everyone very much for your assistance! I have been saved!
Comment #8
gregglesGlad to hear it's fixed.