Is there 5.x compatability in the works? Please let me know one way or the other. I am willing to work on it over then next week or so if needed.

Thanks.

Comments

marble’s picture

I was planning on working on this myself, but my personal circumstances make that a bit tricky currently, so if you'd like to work on it, I'd be happy to get the patch. (You're the guy who did the 4.7 compat one too, aren't you? Thanks for that!)

brdwor’s picture

Assigned: Unassigned » brdwor

I will take this on. (you are correct, I did the initial 4.7 compat also). Look for something in the next couple days.

brdwor’s picture

Status: Active » Needs review
StatusFileSize
new17.17 KB

This module runs as expected on 5.x-RC1.

Known Issues:
The css for the summary does not work properly with the default 5.x theme. It does work with the other themes. I haven't looked into this issue yet.

$_POST['op'] is not supposed to be used... With that said, the custom yield form is working in this patch with 5.x-RC1.

brdwor’s picture

StatusFileSize
new84 bytes

The info file is also needed.

Also, the translations will need to be updated, as a couple strings were changed/added.

marble’s picture

Wow that was fast. Thanks. I'd like to branch it and do a 4.7 release before applying these to the trunk, but if you have any further updates, attach them here and I'll apply them once this is done.

boris mann’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch -- works as expected. Would be nice to have both a 4.7 and a 5.0 branch to work with. You don't necessarily need to "release" a 5.0 version, but at least we can work on code there rather than having everything stuck in HEAD....

marble’s picture

Status: Reviewed & tested by the community » Active

I have applied the patch to HEAD, but I get a 403 error trying to access the .info file. Could you email it to me or something? Thanks.

brdwor’s picture

It is just a txt file with the following in it. cvs should automatically add the version info to it on the first commit.

; $Id$
name = Recipe
description = Collect and display recipes.
package = "Content"
Thomas Rasmussen@p7.dk’s picture

I have tried to use the CVS module for drupal 5.0, and on a clean new installation, it works fine, however it seems as though the database layout has changed significantly, so it would be nice to have some form of 'migration' from 4.7 to 5.0 database. I have created the needed tables by hand, but all my 'old' recipes are not very usable due to lack of ingredients :-(

http://www.p7.dk/recipe

(haven't figured how to list all recipes yet... so list may be small)

Thomas Rasmussen@p7.dk’s picture

StatusFileSize
new2.64 KB

OK, now I figured howto migrate some of the data from the old style of tables to the new ones... these SQL statements where all that was needed, before I could do this, I had to create the three new tables; recipe_ingredient, recipe_node_ingredient and recipe_unit and fill recipe_unit with data. The attached file does this (on mysql).

Copy all ingredients to new table
insert into recipe_ingredient (id,name) select iid,ingredient from recipe_ingredients;

Copy ingredients to node_ingredient
insert into recipe_node_ingredient (nid,ingredient_id) select nid,iid from recipe_ingredients;

Set default values to "0 unknown"
update recipe_node_ingredient SET unit_id=29,quantity=0 where unit_id=0;

All that is needed is to get the recipe module to list all recipes and not just the 5-10-15 last ones. Also, I tried to create a vocabulary and edit one of my recipes to set to this category, then I can't find my other recipes :-(

Thomas Rasmussen@p7.dk’s picture

And the problem with having set one or more vocabularies for recipes, is solved by first create a single vocabulary and term for recipes. This should get tid=1 in the term_node table (check it first!) if this looks right, then I have just added the list of recipes to the term_node table;

insert into term_node (nid) select nid from recipe;

And then set a default of tid=1 for all entries where tid=0:
update term_node set tid=1 where tid=0;

For instance if the first term created is a 'Default' or 'Uncategorized' then this makes sense until you have created and changed the recipe types to your preferences.

marble’s picture

Were you using the 4.7 module from cvs? or the patch that kbahey posted on an issue here? I didn't think there were database compatibility issues between the released 4.7 module and 5.0. Did you switch from simple to regular mode at the same time?

pegmonkey’s picture

+1 for the patch.. I grabbed the head cvs version 1.72 of recipe.module and the head cvs version 1.2 of recipe.info and it worked fine for me. Was previously running the 4.7 version. I did notice the summary looked a lot different in different themes.. but, it's completely useable.

nancydru’s picture

Any idea how far away we are from having a "legal" version for 5.1?

marble’s picture

I'd like to make a 5.x release soon. Current CVS versions apparently work with 5 (and should work with 5.1, but I've not tried that myself). I thought the automated system would start making snapshots of that available to make it easier for people to try it out, but on checking just now I see that's not been happening. I'll look into that.

pegmonkey’s picture

It works in 5.1 for me.

lionheart8’s picture

I'm anxiously waiting for the 5.1 compatible version and actually check this page everyday for any morsel of information to that effect. ;) If I're a programmer I'd do anything to help speed it up. Whoever is doing some work behind the scenes, you have my moral support.

brdwor’s picture

The current HEAD version in CVS is compatible with 5.1

I think a branch just has to be made for 5.x and an initial release made for this to show up on the list of versions

If you don't have CVS software, go to this site and download the files individually until we create the branch: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/recipe/

lionheart8’s picture

Hi,
thanks for responding. Yes I went to that page & downloaded all the files I found there. I uploaded the directory I had insertted them in named "recipe", but it does not appear on the modules page, where I had gone to activate it. Could that be because of the missing "branch"? Anyway, the fact that I have most of the files "in my hands" is already a big step. Thanks a lot and please continue the good work!
:)

Paike’s picture

Category: feature » bug
Status: Active » Postponed (maintainer needs more info)

Hi, I also installed and tested it, my only issue is that the ingredients show up with small letters, small type. Did anyone else experience this? I tried to change this in function recipe_load_ingredients($node) with ucfirst($ingredient) but I got stuck while handling with arrays :(

I have to say that I do not have a clean installation of drupal, I modified to use as a wiki, with Freelinking and Pathauto enabled, maybe this could cause the small type, letters?

brdwor’s picture

Category: bug » feature
Status: Postponed (maintainer needs more info) » Active

Please add this last bug report as a seperate issue

lionheart8’s picture

Hi,
it seems it is only me who does not have it working at all after downloading those files on the CVS page. (I inserted them in a directory I named "recipe" & in side it I created another directory "po" in which I inserted the corresponding files. I hope that is correct). May be I missed some important file, or what would make it not appear at all on the modules page for activation?

lionheart8’s picture

Hey, I went back & redid a few things & now have it working. :)
So far so good. If I notice any bugs, I will be back.

Just a question:

Is it possible to add an image other than as an "attachment, ie right beside, below or above the recipe? Any module that can help?

Thanks soooo much.

lionheart8’s picture

Back ;;)

When I went to look at the mysite.com/recipe, the page with the Latest Recipes after successfully submitting a recipe, (which appeared on the front page with no errors, there's this error:

user warning: Unknown table 'n' in field list query: SELECT DISTINCT(n.nid), title, sticky, created FROM node WHERE status = 1 AND type = 'recipe' ORDER BY sticky DESC, created DESC LIMIT 0, 5 in /home/xprt007/public_html/drupal5/includes/database.mysql.inc on line 172.

I gambled & tried to force an update with update.php & selected the "1" update... As m,entioned, that's a gamle & so the results below wont surprise those who understand this better than me. (I have the weight.module enabled - I dont know if that's a problem)

the results:

    * user warning: Can't DROP 'weight'; check that column/key exists query: ALTER TABLE recipe_node_ingredient DROP weight in /home/xprt007/public_html/drupal5/includes/database.mysql.inc on line 172.
    * user warning: Duplicate column name 'preptime' query: ALTER TABLE recipe ADD COLUMN preptime int(10) NOT NULL DEFAULT 0 in /home/xprt007/public_html/drupal5/includes/database.mysql.inc on line 172.

...

lionheart8’s picture

Well, a few things have transpired since I posted above.

After I created categories, the error message ceased coming.

The only conspicuous thing missing is the list of submitted recipes on the /recipe page under "Latest Recipes".

After some gymnastics with the old recipes import function in recipe.module, I was able to import stuff from other table of old recipes I was forced to import the tables to drpl5_db tables (& renamed to recipes_old, etc, because I didnt know to modify the commands to import directly from drlp1_db ( recipe, etc. Any suggestions how to do that?)

The problem remains, that the submitted recipes are not listed on the /recipe page ... now only the created categories there.

brdwor’s picture

Version: master » 5.x-1.x-dev
Status: Active » Fixed

I branched the module for 5.x. The tar file should show up within 12 hours. HEAD will now be for 6.x development...

lionheart8: I can not re-create your problem with recipes not showing up on the /recipe main page. If you continue to have problems with this please create a new issue against the 5.x-1.x-dev release.

lionheart8’s picture

Thanks for the latest 5.0 release.... :)

For some reason I dont know, sometime after I made the above post, the problem simply melted away. I have everything functioning. I have in fact just replaced the module with the newest release.

One question I have though, is whether means for embedding photos within the recipe page, (not a mere attachment) could be included. I at first got excited when I saw the image_assist module (I think), which seems to provide the function. The problem is the image somehow appears else where and not on the recipe page, where the process was started.

If I simply did that wrongly, let someone help & tell me how to correctly use it, or suggest any alternative means if available.

Thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)