hook_content_is_empty() is not implemented
aries - December 13, 2008 - 12:44
| Project: | Relevant Content |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Hi,
Sometimes i get this when I submit a content:
Fatal error: Call to undefined function relevant_content_cck_content_is_empty() in content.module on line 892
| Attachment | Size |
|---|---|
| relevant_content_hook_is_content_empty.patch | 373 bytes |

#1
Hmmm thanks! I'll have to take a look into this hook. Does it really only need to return TRUE?
#2
AFAIK it's content is always empty.
#3
According to....
http://drupal.org/node/191796#191796-misc
It looks like the hook should probably be looking in the result set to see if there *are* any relevant nodes, then based on the result return TRUE or FALSE depending on if the result is empty or not...
I'll need to examine some other modules to see how this works.
Cheers,
Nick
#4
I think we're in the same shoes as with the computed field. It's a function to remove the unnecessary values at node saving.
This means for me that we have to return always TRUE, because there's no field what we filled. Otherwise you'll gave empty records in the database.
I might be wrong, i haven't had time to check the other usage of this hook.
#5
I had to disable this module because my users could no longer enter content — they were greeted with this error message instead. Is there a fix for this?
#6
I have encountered this bug also, apparently the patch is not in the 9/17 dev yet. (which I am using)
I encountered this when using the main drupal content list screen to change the published status of several nodes that content relevant_content cck fields.
Note:for production sites with error reporting turned off it causes a WSOD, by the way.
I am going to try implementing the above patch. Perhaps the patch could be put in dev?
Mike