Hi

We're having some problems with data loss for recipe nodes.
If you create nodes and then manage them in the admin content page (admin/content), say, publish or unpublish them, you get this error:

Notice: Uninitialized string offset: 0 in recipe_update() (line 233 of recipe/recipe.module).

And the result is data for description, instructions & notes truncated to the first character as it's not an array at this point.

Attaching a patch that checks if the data is an array and place the right value.

CommentFileSizeAuthor
recipe-notice_error_on_update-0.patch920 bytespcambra

Comments

mikeryan’s picture

Status: Needs review » Reviewed & tested by the community

I'm getting a similar issue when migrating into recipe nodes - the loaded node has description/instructions/notes as simple strings, not value arrays. This patch fixes it.

cb’s picture

I was getting the same problem using Scheduler - this patch fixes the issue, thanks very much.

jvandervort’s picture

Status: Reviewed & tested by the community » Fixed

Comitted to dev, thanks for the help.

pcambra’s picture

Thanks, please consider proper git attribution for future non-maintainer's contributions to the project.

jvandervort’s picture

Sure, feel free to use "git format-patch" or include your preferred author string in the issue, and I'll try to apply the git author credits. I did at you to the commit message using the old way though.
And again, thanks for the patch.

scor’s picture

@jvandervort FYI the git --author string to use is only a click away, it is available on people's profile page in the "Git attribution" section, see for example http://drupal.org/user/122101 says --author="pcambra <pcambra@122101.no-reply.drupal.org>"

Status: Fixed » Closed (fixed)

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