Closed (fixed)
Project:
Recipe
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2006 at 05:40 UTC
Updated:
13 Aug 2006 at 13:30 UTC
Jump to comment: Most recent file
Attached is the module. Sorry, but in the process of making this compatible with 4.7, many functions changed, and changing the main recipe page to not have a dependency on taxonomy_dhtml added more functions, so the file is reorganized with the hooks grouped together, also the theme functions are grouped together. The changelog.txt contains some of the changes made, also the install.txt is updated with install and upgrade instructions. I have done testing with with current version of head.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | recipe.JPG | 105.06 KB | thierry_gd |
| #9 | recipe_3.module | 41.83 KB | marble |
| #8 | recipe_2.module | 41.87 KB | marble |
| #7 | recipe_0.install | 7.19 KB | marble |
| #6 | recipe_1.module | 40.99 KB | marble |
Comments
Comment #1
Thox commentedA few notes:
Then one of my biggest concerns: recipe has no dependancy on taxonomy_dhtml. Any features introduced to group the recipes in any way should be left as a generic taxonomy-based solution, most likely not built in to this module. I'd welcome any comments on my opinion though, as I could easily be wrong.
Comment #2
brdwor commentedAbout removing dependency on taxonomy_dhtml, the code used to group the recipes is standard taxonomy code, however taxonomy.module does not contain enough code to do everything. I used article.module as a base for the code. Much code is added to that module as well. A solution would be to add code to either node.module or taxonomy.module, but, that will probably meet resistance. taxonomy_dhtml is not compatible with 4.7, and it doesn't seem to do anything that taxonomy.module shouldn't do already, therefore I added code to the module.
I'll check into code for the table of form elements, and post an update.
The autocomplete does work, and it is the same function as the original module. So that is a feature request unrelated to this, but I will look into that as well.
book.module, the orginal recipe module, example_node.module, and article module used different block comment types. I didn't spend much time trying to commonize them if I stole a function from a different module, as I didn't spend much time on converting legacy functions to use spaces instead of tabs, I didn't hit tab once while editing this module, unless if my editor added tabs from multiple spaces.
I agree there should be a setting to disable the HTML export, I will add that.
Comment #3
moshe weitzman commentedI think a Drupal lesson is in order ... When Thox gives feedback as a module maintainer, he is identifying deficiencies in the patch which must be corfrected before he commits the patch. That includes small stuff like changing tabs to spaces. It doesn't matter if those tabs existed before in recipe.module or elsewhere.
It is a pain to get a patch committed into Drupal, but these high standards help keep the code clean. If a person doesn't want to correct all the difficiencies identified by the module maintainer, thats OK. The patch will likely die as an unfinished contribution. It is rare that a module mantainer happily takes a far from finished patch like this one and cleans it up and commits it.
I encourage everyone to contribute patches and persist through the patch review process.
Comment #4
brdwor commentedDrupal coding standards are for core. Many modules do not meet these standards, and this code works. I return to work tomorrow, and will not have time to make a ton of style changes to the code. I did not have to post this work for the community. But, since I had a need to make changes to the module, made it compatible with HEAD, and fixed many bugs, I posted it so that others did not have to redo my work. I do not personally care if this get's into cvs, as this module is pretty much unmaintained, none of the new features posted in the issue tracker are being address, and many of the bugs are not even addressed. Responding to this work with a "drupal lesson" is a good way to not get help with your neglected modules in the future.
Comment #5
jivyb commentedLet me say thanks for submitting this revision. I appreciate it though I am ignorant of drupal's conventions. I hope you're still checking this forum.
The complex mode works but if I set it to simple, nothing I enter in the forms is retained and I just end up creating a bunch of empty nodes (no title, nothing). Then if I switch back to complex, it won't retain any ingredients, forgetting previously entered ingredients. I've tried flushing the cache, deleting the whole module, dropping and reinstalling the tables, etc.
Comment #6
marble commentedI have tried to rework brdwor's patch to incorporate (some of) thox's comments.
What I've done is:
I looked at the comment block formatting, but I don't understand thox's criticism here, so was unable to do anything about it. Ditto for the form generation (I'm kinda new to drupal, so maybe there's some big difference I'm not seeing - it all looks like it builds $form[] and returns it to me). Feel free to expand upon these points and I'll see what I can do.
I did not add an option to disable HTML export (yet) because I was focusing on getting existing functionality into shape first.
Comment #7
marble commentedHere's the install file, since I can only attach one file per followup.
Comment #8
marble commentedAttached version includes settings to enable/disable export to RecipeML/HTML.
Note that I've discovered that the custom yield feature doesn't work. As far as I can tell, $_POST is empty by the time theme_node_recipe is called, so it always defaults to showing for a yield of 1.
Comment #9
marble commentedoops, didn't mean to attach that version...
Comment #10
hpn commentedThe module attached by marble has errors.
Fatal error: Cannot redeclare theme_more_info() (previously declared inComment #11
marble commented'previously declared in' what? This module works for me in 4.7.2 without giving this error.
Comment #12
andylei commentedhey marble, thanks for the work on the patch. for the most part, its working really well.
i don't know if anyone else has this problem, but when you preview a recipe, everything you entered goes away, and it shows a blank node. none of the data entered is saved and creates a completely blank node.
Comment #13
loganbear commentedWhen I either submit or preview a recipe I get the following message:
Fatal error: Cannot use string offset as an array in /var/www/furaphee/modules/filter.module on line 842
line 842 is in the form validate routine.
Comment #14
drawk commentedThanks marble. This is working great for me.
A couple of things I noticed:
1) a recipe does not show up under "recipes" unless you have created a category vocabulary and assigned a category to the recipe. I don't think that this is a problem, but it took me awhile to figure out why new recipes weren't showing up after I added them.
2) if you assign a recipe to multiple categories, it shows up in the "recently added" area multiple times. So if you assign it to 3 different categories (ie. "vegetarian" and "side dishes" and whatever else) it shows up three times consequetively under "recently added".
3) if you have something associated with multiple categories (or single categories in multiple vocabularies), it only shows one of them in the summary.
I might take a crack at resolving some of the above as multiple categories are important for what I'm doing with the recipe module.
Thanks for all your work.
Comment #15
jivyb commentedI have the same problem as andylei. I've installed on two different servers. Bummer cause I miss the module too...There are no watchdog errors, just blank nodes.
Comment #16
marble commentedloganbear: I haven't been able to reproduce that problem here yet
hpn: Seems this module clashes with another one you have installed. I'll rename the theme_more_info function to theme_recipe_more_info.
andylei/jivyb: thanks for pointing that out. I am having a little trouble working out why it's happening, but I wrote a new module from scratch that can preview ok, so I'll add bits of recipe into it until I find out what breaks the preview...
drawk: thanks for the feedback, I'll try looking at it after I work out what's going on with the preview thing, but if you can fix it and attach a patch, that'd be great too.
everyone: I tried contacting Thox to see if this is ever likely to get applied, and didn't get a reply yet. I'll try contacting moshe, and if I can't get a reply there either, I'll probably have to release a forked version - keeping track of all the issues etc in one thread like this isn't very efficient.
Comment #17
moshe weitzman commentedI suspect that we need to hand over maintainership of this module to someone new. If you think you could be that someone, please contact me or Thox.
Comment #18
loganbear commentedProblem resolved -- it dealt with several issues -- my starting to build a recipe module for 4.7 (the version I started with Drupal) without knowing there already was one in development -- my getting the cvs version of the recipe module -- my installing the new improved version.
When I rebuild my site from scratch, the problem disappeared.
Comment #19
thierry_gd commentedWorks fine for me.
I think this can be apply
Comment #20
thierry_gd commentedA little spelling mistake with the word "quantity"
'#value' => '
'."\n".'
',should be replaced by :
'#value' => '
'."\n".'
',Comment #21
thierry_gd commentedSome little problems with the droplist "Units" cf. joined picture ==>look at "unit()" and "unknown()" which shouldn't appear there.
Comment #22
marble commentedI've now applied the patch. The preview, yield, string index and quantity typo issues should also be resolved. Please raise any bugs that exist in the new cvs release as separate issues.
Comment #23
(not verified) commented