I'm just trying to setup PHPRecipeBook for the first time, so maybe I have done something wrong.
I am trying to run this on a godaddy linux host (if that is relevant).
When I first installed it, it was running under PHP5.3 and kept coming up with an error regarding a deprecated command. Switching the web host to PHP 5.2 seems to have resolved that.
I uploaded the 3 SQL scripts to the database, including the Ingredients file. MYSQL reported a successfull import of something like 12,000 entries. When I now look in the database, there are thousands of ingredients that I can see.
However in the web interface, I cannot see any ingredients, nothing is listed.
If I try to add an ingredient, I get the following error
Fatal error: Call to undefined method Units::getLocalUnits() in /home/content/30/9321430/html/recipes/modules/ingredients/addedit.php on line 32
I am by no means an expert on this program but I think I may know this ingredient issue.
If you can look at your db through phpadmin (or a likewise program), you will probably see that these ingredients are not issued to an "ingredient_user". I believe that you, being the admin, are user 1.
In my experience, the ingredients you uploaded are for your convenience when adding recipes. When adding a recipe you just need to type the first couple of letters of the ingredient and a list of ingredients should appear, allowing you to choose which ingredient you want.
If the ingredient doesn't appear, this is when you click the Ingredient - (beside the qualifier) and enter the new ingredient you want. You should then see the ingredients you used for this recipe in your Ingredients list.
In other words, the ingredients you uploaded will not show until you have actually used them in a recipe. You will then be able to edit them the way you like.
As I indicated in the beginning of this post, others will know far more than me, I thought I would answer as I had the same issue when I began.
Thanks for your reply. Unfortunately when I try to add any ingredient it comes up with an error
Sorry I managed to cut off the rest of my reply when I pasted the error message somehow :-)
I can see the ingredients in the DB, but might need some more pointers to what table lists their assignment?
When I add a recipe, i do the type-ahead thing, and nothing appears. The above error message is shown if I try to add an ingredient either "in the recipe" or from the ingredients page.
If I then add that recipe (without any ingredients) to my meal planner, it produces no error message, but doesn't appear.
Something strange is going on.
What version of PHPRecipebook did you download, 4.0 beta? The reason I ask is in 4.0 I removed the local unit stuff, it apperas to be working fine during testing.
I'm getting the same error in version 4.0 Beta 3.
The error in Apache's logs is:
PHP Fatal error: Call to undefined method Units::getLocalUnits() in /public_html/chef/modules/ingredients/addedit.php on line 32, referer: http://<<URL>>/index.php?m=ingredients
I was able to make the error go away by adding the function I copied from version 3.0's ./classes/Units.class.php to the corresponding 4.0 Beta 3 file.
Now I'm able to add ingredients form the ingredients module, however after clicking 'Add Ingredient' I get a confirmation screen that is a bit off and unthemed (the ingredient is still added). Once in this unthemed screen, I get the form for adding a new ingredient again, however the AJAX calls do not work and the form will not submit again.
I can also use the 'Add Ingredient' in the recipe editor after copying over the function , however doing so prevents the 'Add Recipe' and 'Update Recipe' buttons form working. I've been able to work around this by going into a recipe, adding ingredients w/o any other changes and then refreshing the page so I can use the newly added ingredients and still save the page (so long as I don't add any more.
I'm hoping to play around with this a bit over the weekend to see if I can figure out the problems I'm still seeing when I copied over the function, but for the most part, I can deal with this. I'm really loving the rest of this project though, so I'm more than happy to put up with this. If I do get time to look more and figure anything else out, I'll post here again.
I have also just installed 4 Beta 3 and am not able to add a recipe due to non functioning Ingredients. The debug is not very useful, more logging would be great
problem 1, unable to get add ingredients to work, just shows a blank screen
problem 2, unable to add ingredients to a recipe, this section is also complaining of duplicate ingredients
Fixed the Problem about addding in ingredients on the ingredients page. Fix in b4. I am not seeing the duplicate ingredients error.
btw: the current code still has an issue with the following
-> SELECT setting_version FROM recipe_settings
I am sure you are positioning for upgrade functionality but the recipe_settings table is not consistent with this query
fixed that in 4.01
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.