Download & Extend

hook_content_is_empty() is not implemented

Project:Relevant Content
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

AttachmentSize
relevant_content_hook_is_content_empty.patch373 bytes

Comments

#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.

If a specified number of multiple values was requested or this is the zero delta, save even if empty and keep a NULL value for each of its columns so there is a marker row in the database, otherwise unset the item.

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

Priority:normal» critical

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

#7

Status:needs review» fixed

Implemented in 6.x-1.5

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.