G'Day Ron et al,
We're just warming up a fresh Biblio install on a Pantheon environment and have encountered a puzzling warning on create new content:

Warning: strtotime() expects parameter 1 to be string, array given in node_validate() (line 1024 of /srv/bindings/ab02260b301f4208b5b405fd101ff137/code/modules/node/node.module).

This is displayed after we choose to create a biblio node (eg, journal article). The node input form is rendered fine, but the Warning is reasonably off-putting.

I could not see any google clues or relevant issues in the biblio queue.

Any ideas how to approach this?

Thanks in advance!

Comments

rjerome’s picture

Hi John,
Do you know what version of PHP is being used?

boabjohn’s picture

G'Day Ron, looks like this:

PHP 5.3.17 (more information)
PHP extensions Enabled
PHP memory limit 256M

What do you think...could be related?

rjerome’s picture

No, nothing suspicious there. Does this only happen with biblio nodes? i.e. can you create some other type of node without issue?

The warning is coming from the node module, this line...

$node->created = !empty($node->date) ? strtotime($node->date) : REQUEST_TIME;

Which leads me to believe that some other module is messing with the $node->date field. I searched the entire biblio code base and I'm not changing it.

Do you have any other biblio related modules enabled?

boabjohn’s picture

Hi Ron,
Thanks for looking in.
Warning only occurs on biblio nodes.
I have the Biblio Zotero module installed as well, so tried disabling that and re-adding a Biblio node and the warning still occurs.
Any other thoughts? Do you think it would be more appropriate to shift over to the Drupal core queue? Or start some brute-force, per-module process of elimination?
Kind regards,
JB

rjerome’s picture

Do you have an custom "field" modules associated with Biblio content type? Could be one of those...

boabjohn’s picture

Howdy Ron,
There are four custom fields, none of which look related to date...but do you suspect anything here:

  • Entity Reference--Select list
  • Term reference--Check boxes/radio buttons
  • Image--Media file selector
  • File--Media file selector

I can remove these of course, but it's a pain. If I just turn off the associated modules would that be a valid test? Eg, shut off the Media File module?

rjerome’s picture

Sure I would try disabling the modules if possible.

Just to confirm... You are running 7.x-1.x?

I ran the latest 7.x-1.x version in my debugger, and when I got to that point in the node module, the node->date field was empty, so I really don't have any idea where that is coming from. I suggested it might be a field module, because "entity_form_submit_build_entity()" gets called just before that error occurs.

boabjohn’s picture

Hey there Ron,
Sorry with the slow reply...we're still in holiday mode here.
The version in my module list says:
Biblio: 7.x-1.0-rc7+5-dev
And in terms of disabling modules it doesn't seem as easy as I'd hoped since all these modules are wrapped up in dependencies. Using D7 and Panopoly's Field list, I can see the fields/modules like this:

  • body (module: Text)
  • field_download File (module: File)
  • field_key_image Image (module: Image)
  • field_key_topics Term reference (module: Taxonomy)
  • field_proj_reference Entity Reference (module: Entity Reference)

As you can imagine, disabling the modules for Text, File, Image, or Taxonomy is pretty convoluted and wouldn't leave me with much of a site to test!
All of these fields are used by other entity bundles, so again I'm not sure how to isolate the behaviour that Biblio is objecting to.
Any more thoughts?
Kind regards,
JB

misselbeck’s picture

I was able to fix the same error by disabling the datepicker popup widget for the Biblio content type. This is done by unchecking "Enable datepicker for authored on date" under the "Date Popup Authored settings" on the edit tab for the Biblio content type.

boabjohn’s picture

Hey there @misselbeck: that silenced the warning for me too! Thanks very much for sharing the tip.
Kind regards and best wishes for 2014.

rjerome’s picture

Someone should log an issue in the appropriate module queue, since there is still something amiss here.

huizache’s picture

same problem, came up randomly, used the same solution #9

liam morland’s picture

Status: Active » Fixed

If you need further help, please re-open and provide details.

Status: Fixed » Closed (fixed)

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