If you click preview the input boxes are fine but the recipe ingredients don't show and the feilds below the preview go blank. Using the browsers back button and selecting submit will cause the submitted one to show the ingredients. So it seems to only be a problem with the preview. Also it doesn't seem to have a box to allow me to add more ingredients. So far I've had at least one recipe that needed more ingrients fields and had to put the extra ingredients into the how to prepare box.
I also just got these errors:
warning: in_array(): Wrong datatype for first argument in ~/modules/recipe/recipe.module on line 483.
warning: Cannot modify header information - headers already sent by (output started at ~/includes/common.inc:384) in ~/includes/common.inc on line 192
The line 483 error appeared 10 times oddly enough on that one error page listing both errors. I am using the Ajax module thanks to someone giving me the heads up on that. But I'm not using cvs drupal. I'm using drupal 4.6.1.
Comments
Comment #1
celticess commentedDarnit add in this error now:
warning: in_array(): Wrong datatype for first argument in ~/modules/recipe/recipe.module on line 487.
That was after editing the recipe where I didn't have enough ingredient feilds. Oddly on the edit I was presented with enough field boxes/extra field boxes. The actual imputted recipe looks fine when clicked for display it's just submitting and editing them seems to give some errors and have some issues. :/
Comment #2
Thox commentedI've also had the same in_array() errors. This seems to be an annoying PHP problem that didn't arise on my PHP5 test machine. I may have to create my own in_array()-like function that works for objects.
When you preview or submit a recipe, it should always give you 10 more spaces than the current number of ingredients. A future plan is to make a simple "Add" button which lets users quickly add more ingredients (without reloading the page).
I'll have to run some debugging of the preview functionality.
Comment #3
celticess commentedThe actual recipes once in look great. It's just spitting out error codes despite it going in fine. That would be great if you could add a "add more ingredients" button on it. I think the old version of this module had that. Right now I'm just trying to paste over all my old pmwiki recipes. Anyways the hosting is using php 4.3.10 on a debian machine. I don't know if that makes much difference in why these error codes are comming up.
Comment #4
Thox commentedPHP 5 has better object support. I'm pretty sure the problem was PHP 4-only, but I've fixed I've replaced in_array() with a custom function just in case.
Fixed in CVS.
Comment #5
celticess commentedThanks! No more of the errors spitting out. :) Too bad there isn't a unit conversion module around as that would compliment this for those that use different measurement systems.(ie they could convert it from what I use to what they do) I'm in canada so I use both. Though I tend to leave cooking temps as F vs C.
Comment #6
(not verified) commented