I tried the experimental code available at your external site, and found that it would not create new ingredients. I do not profess to be much of a Drupal programmer.

However, it looks like the problem is in recipe_ingredient_id_from_name($name), at the point where it tries to set $node_link. This is the point in the code where we've determined that the ingredient is not in the database. I do not understand why $node_link needs to be set, or why it needs to go into the link field, but it is clear that it needs to be set to something real. A null value fails.

Comments

N.Levy’s picture

It has been reccommended that users add the following line:

if (empty($node_link)) { $node_link=0; }

on line 559

sunfish62’s picture

Status: Active » Reviewed & tested by the community

That patch does fix the problem. Is it actually the *right* fix?

marble’s picture

I believe so. I think we probably need to get this version into cvs so that we can keep track of stuff like this.

brdwor’s picture

Version: master » 6.x-0.1

changed version issue is marked against.

brdwor’s picture

Status: Reviewed & tested by the community » Fixed

committed to 6.x-1.x-dev.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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