Postponed (maintainer needs more info)
Project:
Relevant Content
Version:
6.x-1.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2009 at 18:48 UTC
Updated:
29 Jan 2010 at 12:06 UTC
Hi, Thanks for great module.
But there is a problem in my site. When i try to show relevant content in CCK type. It shows a warning message. What can i do for solve this problem. Thank you.
warning: Invalid argument supplied for foreach() in /opt/modules/relevant_content/relevant_content_cck/relevant_content_cck.module on line 226.
Comments
Comment #1
asb commentedHi,
I'm getting similar errors with D5 version:
When this error appears, no related content is displayed. I'm using the CCK "relaed content" field, embedded into a fieldgroup. Node type: vanilla "article" (plus a bunch of CCK fields), one term from one vocabulary; the error appears also, when the node is tagged with two terms from two vocabularies.
I think, the reason for this error message is that no exactly matching content is available (the "related content" algorithm seems to be pretty simple; as far as I understand it, it does not evaluate text from the node's title or body to evaluate similarity (like the "Similar" module does, resulting in far better results).
Try adding content in the same category and have a look if the error disappears. If I'm right, maybe the error message simply should be suppressed or changed to a translatable string like "There is no related content available".
Greetings, -asb
Comment #2
aterchin commentederrors upon activating both modules:
step two, add the relevant content cck field, get about two of these for each post on visiting the homepage with all the teasers, field set to display teasers.
Goes away when display set to 'title-link'.
Comment #3
nicholasthompsonI'll have to take a look at this. Thanks.
Comment #4
nicholasthompsonPossible dupe of #331625: foreach/sql errors when creating CCK fields
Comment #5
asb commentedHi,
I'm setting this issue to "critical" since it breaks a lot of widely used other modules, e.g. "Views Bulk Operations" (VBO), and
relevant_content_cck.modulehas to be disabled every time they're being used.The patch provided in #331625: foreach/sql errors when creating CCK fields fixes the issue for D5 sites, but doesn't work for D6. However, even for D5 a new release including the patch would be nice ;)
Greetings, -asb
Comment #6
ruharen commentedI'm getting this error too with Relevant Content CCK module but only for nodes that DO NOT have related nodes.
Comment #7
tormu commentedThis worked for me: http://drupal.org/node/331625#comment-1204192
I was also getting the same error as the original poster, line 226