hi
so far everything was ok, i enabled the views so when someone click on taxonomy new page opens he see list (doesn't matter) but after couple of days i added new taxonomy so when someone adding new item to the page and he add new term (coz on my site the users when adding new item they adding new terms)

but now the new term link doesn't work
and i have this when i click o it:

* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/includes/common.inc on line 1600.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/includes/common.inc on line 1600.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/includes/common.inc on line 1600.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in /srv/www/htdocs/site103/includes/common.inc on line 1600.

can someone tell me why my taxonomy links doesn;t work no more? please

Comments

pworth’s picture

I just came across this too. I having to dive deep into the core to try to track this down. I put a stack trace at line 807 mentioned above and this is what came out.
#0 views_break_phrase(, stdClass Object ([value] => )) called at [/var/www/site-94/americasbestteacher/sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc:67]
#1 views_plugin_argument_validate_taxonomy_term->validate_argument() called at [/var/www/site-94/americasbestteacher/sites/all/modules/views/handlers/views_handler_argument.inc:638]
#2 views_handler_argument->validate_arg() called at [/var/www/site-94/americasbestteacher/sites/all/modules/views/handlers/views_handler_argument.inc:658]
#3 views_handler_argument->validate_argument() called at [/var/www/site-94/americasbestteacher/sites/all/modules/views/views.module:269]
#4 views_arg_load(, taxonomy_term, page, 2)
#5 call_user_func_array(views_arg_load, Array ([0] => ,[1] => taxonomy_term,[2] => page,[3] => 2)) called at [/var/www/site-94/americasbestteacher/includes/menu.inc:407]
#6 _menu_load_objects(Array ([path] => taxonomy/term/%,[load_functions] => a:1:{i:2;a:1:{s:14:"views_arg_load";a:3:{i:0;s:13:"taxonomy_term";i:1;s:4:"page";i:2;s:6:"%index";}}},[to_arg_functions] => ,[access_callback] => views_access,[access_arguments] => a:1:{i:0;b:1;},[page_callback] => views_page,[page_arguments] => a:3:{i:0;s:13:"taxonomy_term";i:1;s:4:"page";i:2;i:2;},[fit] => 6,[number_parts] => 3,[tab_parent] => ,[tab_root] => taxonomy/term/%,[title] => ,[title_callback] => t,[title_arguments] => ,[type] => 4,[block_callback] => ,[description] => ,[position] => ,[weight] => 0,[file] => ), Array ([0] => taxonomy,[1] => term,[2] => )) called at [/var/www/site-94/americasbestteacher/includes/menu.inc:556]
#7 _menu_translate(Array ([path] => taxonomy/term/%,[load_functions] => a:1:{i:2;a:1:{s:14:"views_arg_load";a:3:{i:0;s:13:"taxonomy_term";i:1;s:4:"page";i:2;s:6:"%index";}}},[to_arg_functions] => ,[access_callback] => views_access,[access_arguments] => a:1:{i:0;b:1;},[page_callback] => views_page,[page_arguments] => a:3:{i:0;s:13:"taxonomy_term";i:1;s:4:"page";i:2;i:2;},[fit] => 6,[number_parts] => 3,[tab_parent] => ,[tab_root] => taxonomy/term/%,[title] => ,[title_callback] => t,[title_arguments] => ,[type] => 4,[block_callback] => ,[description] => ,[position] => ,[weight] => 0,[file] => ), Array ([0] => taxonomy,[1] => term,[2] => )) called at [/var/www/site-94/americasbestteacher/includes/menu.inc:316]
#8 menu_get_item() called at [/var/www/site-94/americasbestteacher/includes/menu.inc:343]
#9 menu_execute_active_handler() called at [/var/www/site-94/americasbestteacher/index.php:18]

the taxonomy view worked for me the other day. i forget the timing of stuff, but one variable may be that i installed Views Bonus Pack after I saw it working. Can a views expert please take a look at this and see if it is a bug.

Regards,
Pat

pworth’s picture

After setting up my debugger and walking through, I have found that someone (i suspect pathauto) has inserted a record into `url_alias` table for taxonomy paths. There is a call in bootstrap,inc in phase 'DRUPAL_BOOTSTRAP_PATH' to drupal_get_normal_path(), which in turn calls, drupal_lookup_path('source', $path, $path_language). The return value of drupal_lookup_path() will reset $_GET['q'] based on the alias mapping. In this case, the return was '/taxonomy/term' which was the dst column value of the url_alias table where src = 'taxonomy/term/2' (in my case). So, the views code was expecting a term id (in my case '2') on the end of the path, but it was stripped out in the bootstrap process. I suspect there is or will be a lot of confusion when views and pathauto are playing together.

btw, my 'fix' was to delete the aliases manually and to 'disable' pathauto taxonomy path generation by removing the expression in the pathauto configuration screen.

bass123’s picture

I have the exact same problem. And you are right, pathauto is the culprit.

The pathauto module has a bug in which it creates two url aliases for the last term added to taxonomy.
For example if I add taxonomy term "Business" it creates the following in url Aliases "business->taxonomy/term/16" and "taxonomy/term/16 -> taxonomy/term". The second entry is nonsense of course.

See http://drupal.org/node/295884

As a further example.
If I go to url "Business" then I receive expected content. If I go to "taxonomy/term/16" (which is being directed as above) I receive "Page not found".

Now if I enable the view "taxonomy_term default", then again go to "taxonomy/term/16" I receive all the errors mentioned above. Deleting the nonsense second entry in "url aliases" makes the errors go away temporarily, but next time a term is added; same problem over again of course.

Until a bugfix for pathauto, I'm following pworth's fix.

zigx’s picture

I have noticed something a bit different.

If i simply enable: Default Node view: taxonomy_term (default)

I get:
# warning: Invalid argument supplied for foreach() in /var/www/dstic.com/sites/all/modules/views/includes/handlers.inc on line 807.
# warning: Invalid argument supplied for foreach() in /var/www/dstic.com/includes/common.inc on line 1597

The module causing conflicting issues for me is: Taxonomy menu

If i disable Taxonomy menu and flush caches, then the error goes away.

Any ideas how to fix this?

thank you.

restyler’s picture

the same for me, just enable taxonomy/term view and get the errors

Heilong’s picture

Hi everyone,

I got the same problem after activating the default view taxonomy_term.
Here are the errors I got :

* warning: Invalid argument supplied for foreach() in (...)/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in (...)/includes/common.inc on line 1606.
* warning: Invalid argument supplied for foreach() in (...)/sites/all/modules/views/includes/handlers.inc on line 807.
* warning: Invalid argument supplied for foreach() in (...)/includes/common.inc on line 1606.

By the way I disabled and uninstalled the Pathauto and Taxonomy menu module, and I still have the warnings displayed.

restyler’s picture

do you have taxonomy_menu module enabled?

asak’s picture

I just started getting these error after playing around a bit with taxonomy_menu.

Are the rest of you guys using taxonomy_menu as well...?

pyxio’s picture

I've been getting this error too ... and from my troubleshooting process the culprit is actually path redirect. I believe, for you folks out there having this problem, that you likely have Path redirect enabled. The way to solve this is to delete your TAXONOMY aliases (you don't have to delete nodes etc), then disable path redirect (drop the table from db for extra strength protection), rebuild your taxonomy aliases and everything should be fine. I also thought the default taxonomy view or path auto was the culprit. Give it a shot and let me know if that helps. I'm curious to see how this suggestion works out for you. btw, I wanted to be sure to mention that a large part of the credit for this remedy goes to Jayen Vaghani (indianroo), an excellent Drupal programmer that I've been working with on my current project. Good luck. K

reikiman’s picture

I'm getting this (mis-)behavior.. Am in the middle of upgrading from D5 to D6 and am getting this on the D6 site. The D6 site does not have path_redirect enabled but the D5 site had path_redirect enabled. Obviously there are vestigial path_redirect stuff left over from the D5 site.

reikiman’s picture

I uninstalled path_redirect, made sure the table was gone .. then did

mysql> delete from url_alias where dst like 'taxonomy%';
mysql> delete from url_alias where dst like '%term%';

Rebuilt taxonomy aliases (clicking on the bulk generate ONLY in the taxonomy section).

Still getting the error.

reikiman’s picture

Like one of the people above, disabling the taxonomy_term view gets rid of the message. I'm not seeing an advantage to leaving taxonomy_term enabled ...so...??

On the other hand I have another site on D6, the taxonomy_term module is enabled, and the message is not being printed. Hurm.

pipicom’s picture

I manually emptied all cache tables via phpmyadmin (cache, cache_block, cache_content, cache_filter, cache_form, cache_menu, cache_page, cache_update, cache_views and watchdog). Also I cleared all cache (perfomance), deleted all pathauto urls and temporarily uninstalled pathauto (just in case ;).

The result: message gone, problem solved!

filtermusic.net

dorien’s picture

Same thing here.

/term/

and /term/15 are being linked. And gives the error

startuplab’s picture

Anyone figured out a fix to this.??? This is driving me crazy.

gunzip’s picture

subscribe

NaX’s picture

I suggest anybody that is running Taxonomy Menu that you have a look at this issue http://drupal.org/node/601174 and maybe give the latest dev release a try.

I had these same errors and they went away after upgrading Taxonomy Menu to the latest dev.

NaX’s picture

The errors came back after some more content updates.
I think the problem is a combination of Taxonomy Menu and Custom Breadcrumbs.
The errors go away when I disable Custom Breadcrumbs, is any body else also running Custom Breadcrumbs for Taxonomy.

speedyboum’s picture

That's right. The errors go away when I disable Custom Breadcrumbs... Thanks !