I was trying to a update a node using comment driven when I get these nasty warnings (see attached image). Note: everything seems to save just fine.

Any idea of what is going on? Sorry, I don't have a public site to show, it's running locally as a dev site.

Thanks

Comments

arhak’s picture

Title: Warnings: » warning: Missing argument 2 for driven_diff_drop_keys (driven_cck.diff.inc)

I will need more info

I can tell you this:
- it is related to a date field
- driven_cck is picking up a NULL $value and $default

why?!
you'll have to provide more details regarding your date fields configurations
plus, policies being applied to their respective driven properties

arhak’s picture

and please, next time copy and paste those error messages

warning: Missing argument 2 for driven_diff_drop_keys(), called in /.../driven/props/driven_cck/driven_cck.diff.inc on line 89 and defined in /.../driven/driven_diff/driven_diff.helper.inc on line 36.
warning: Invalid argument supplied for foreach() in /.../driven/driven_diff/driven_diff.helper.inc on line 37.
warning: Missing argument 2 for driven_diff_drop_keys(), called in /.../driven/props/driven_cck/driven_cck.diff.inc on line 92 and defined in /.../driven/driven_diff/driven_diff.helper.inc on line 36.
warning: Invalid argument supplied for foreach() in /.../driven/driven_diff/driven_diff.helper.inc on line 37.
arhak’s picture

Title: warning: Missing argument 2 for driven_diff_drop_keys (driven_cck.diff.inc) » warning: Missing argument 2 for driven_diff_drop_keys (driven_cck date fields)

my fault, silly bug
not picking up null values, I completely forgot to provide the second argument, as clearly stated by the warning
(don't need more details)

arhak’s picture

Project: Comment driven » Driven API
Status: Active » Needs review
StatusFileSize
new1.47 KB
arhak’s picture

what configuration are you using?
a single date field or a from-to date?

I think that line 86 has another silly bug

arhak’s picture

new patch should address both (#3 and #5)

PS: be careful, it seems that date fields haven't been tested since alpha releases started, therefore, they might have more bugs introduced by refactors

gmclelland’s picture

Thank you, that seems to fix the problem.

@#2 - no problem

gmclelland’s picture

what configuration are you using?
a single date field or a from-to date?

I think that line 86 has another silly bug

-It is a single Datetime text field with Date Pop-up calendar with Year/Month/Day granularity. I will test the other patch at @#6.

gmclelland’s picture

The patch @#6 worked fine for me.

arhak’s picture

the patch at #6 is the same than #4 plus a consideration required for single date (i.e. having "from" but no "to")

EDIT: without the extra fix at #6 date ranges (i.e. having from-to) are broken (the "to" date is mistakenly dropped)

arhak’s picture

Status: Needs review » Fixed
Issue tags: +Regression

commited to HEAD

but feedback regarding potential regression for other configurations is still pending

Status: Fixed » Closed (fixed)
Issue tags: -Regression

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