When trying to post to HEAD using an XML-RPC based blogging tool, the server returns "You have to specify a valid date".

Reason:
- node_validate() is called prior to the code which sets the default if the date is not supplied

Fix:
- perform validation after date check - specifically, just prior to node_submit()

The attached patch successfully fixes this problem, allowing posts to be successfully submitted from both Performancing for FF and w.Bloggar (latest of each).

Important Note:

Now that I'm successfully able to post, I'm seeing the following error in the log:

Invalid argument supplied for foreach() in C:\htdocs\drupal\modules\upload.module on line 432.

I believe this error was present before, but was shielded by the "valid date" error, but until this is validated by someone else, I'm not going to file it independently.

Thanks!

CommentFileSizeAuthor
blogapi_validate.patch1.32 KBsamc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

Invalid argument supplied for foreach() in C:\htdocs\drupal\modules\upload.module on line 432.

I believe this error was present before, but was shielded by the "valid date" error, but until this is validated by someone else, I'm not going to file it independently.

hmm... maybe related to this?
http://drupal.org/node/53666

samc’s picture

hmm... maybe related to this?
http://drupal.org/node/53666

Yes!

I've applied your patch and everything appears to be working.

Thanks!

moshe weitzman’s picture

Status: Needs review » Closed (duplicate)
samc’s picture

Status: Closed (duplicate) » Needs review

Just to clarify, I think the patch I submitted is still valid, and I don't think it's a dupe.

The follow-on discussion between markus and I was regarding another error that was shielded by the one that the patch fixes. The thread markus pointed to me resolved the other issue (i.e. bad argument to foreach() in upload.module).

samc’s picture

Version: 4.7.0-beta5 » x.y.z
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

i can confirm this bug. samc confirms that this is the right fix.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)