Closed (won't fix)
Project:
Poormanscron
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2006 at 07:40 UTC
Updated:
27 Sep 2009 at 20:33 UTC
I don't see where to submit issue's for taxonomy_hide module, so writing here (may be it is actually poormanscron bug) and in the forum.
I'm using Drupal 4.7.0 (patched to 4.7.3) & taxonomy_hide rev. 1.2 from cvs and regularly receiving error in logs:
Invalid argument supplied for foreach() in /var/www/....../modules/contrib/taxonomy_hide.module in row 67. upon every run of poormanscron (rev. 1.17). The number on error lines varies with each poormanscron execution.
The line in question is the line with foreach ($node->taxonomy as $key => $value) from function taxonomy_hide_nodeapi:
function taxonomy_hide_nodeapi(&$node, $op, $arg = 0, $arg2 = 0) {
if (!module_exist('taxonomy')) {
return;
}
switch ($op) {
case 'view':
$hidden = variable_get('taxonomy_hide_vocabularies', array ());
if (count($hidden) == 0 && !variable_get('taxonomy_hide_group_by_vocabulary', 0)) {
return;
}
foreach ($node->taxonomy as $key => $value) {
if ($hidden[$value->vid]) {
unset($node->taxonomy[$key]);
}
}
break;
}
return;
}
What does poormanscron do that causes this error?
Thank you.
Comments
Comment #1
Sc0tt commentedI don't know if this is any clue to the problem; but I was getting the same error when my "General Settings" "Default Front Page" was set to a node that no longer existed. Perhaps poormanscron looks thru and includes "old", no longer existent nodes and generates the error.
Big Thanks to module's author for such a great addition to Drupal. If it's not already, this should be part of the core.
Thanks!
Sc0tt
Comment #2
dave reidNo followup in over three years and the 4.7.x version is no longer supported.