Closed (outdated)
Project:
Conditional Fields
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2012 at 10:09 UTC
Updated:
30 Mar 2016 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedI have the same problem on Drupal 7. It won't accept the form.
Comment #2
goldtopdon commentedHi,
The patch supplied in #11 here fixed my problem, may help others too:
http://drupal.org/node/722236
Regards,
Dan
Comment #3
yvmarques commentedI had the same problem and I could fix it with the attached patch.
To be honest I haven't tried with other modules than just CCK, might need some reviews.
Comment #4
areynolds commentedReviewed the patch in #3; the removed code was causing the error in my case, but so was the following block:
This block occurs after $value may have been defined by preceding code. If a legitimate, non-null $value exists, the "else" clause will mean that it is always ignored and the field is regarded as empty. Deleting the else clause causes no harm; if $value is empty (a null value), this will be caught by the final logic check:
Attached patch builds off of #3 and deletes the else clause. I'm wary of getting rid of the block deleted by patch #3, but I'm not familiar with hook_content_is_empty, so perhaps others can advise?
Note that this patch applies against 6.x-2.x-dev.
Comment #5
alibama commentedConfirm patch #4 fixed us using the latest dev version = thanks areynolds et al
Comment #6
yvmarques commentedAs I understood, the hook_content_is_empty doesn't check if the content is empty but set the default empty value to the field.
Comment #7
areynolds commentedSo it's a function that allows you to designate custom "empty" functions on a field-by-field basis? If this is the case, we should debug that code block removed in #3.
Comment #8
danny englanderI ran up against this same issue today and the patch in #4 worked to fix a conditionally required text field but not for a conditionally required imagefield image. In other words on the same node I have both and the textfield works as expected now but I still get an error on node save that the image is required even after I've checked off to allow for an image and uploaded an image. I don't know enough of the nuances here to figure out why.
Comment #8.0
danny englanderAdded details of my Drupal and CF version
Comment #9
peterpoe commented