Closed (fixed)
Project:
Quotes
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
23 Sep 2005 at 18:57 UTC
Updated:
24 May 2006 at 12:16 UTC
Jump to comment: Most recent file
patch attached to provide drupal head/4.7 compatability.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | quotes_3.module | 47.99 KB | mhutch |
| #13 | quotes_3.patch | 29.19 KB | mhutch |
| #7 | quotes.diff | 28.89 KB | mhutch |
| #1 | quotes.module.to47_0.patch | 2.41 KB | moggy |
| quotes.module.to47.patch | 2.08 KB | moggy |
Comments
Comment #1
moggy commentedmodules that create nodes need to supply their own title now.
patch updated to include this.
Comment #2
andykemp commentedHas this been updated in the csv copy yet? As I have a windoze server and so can't patch the file myself!
Comment #3
devinhedge commentedI confirmed this patch. It's running on my website www.devinhedge.com.
Comment #4
devinhedge commentedTo be clear, I've applied 'quotes.module.to47_0.patch' and it works fine.
Comment #5
devinhedge commentedNever mind.
The patched code renders the quote block correctly; however, I can't add new quotes. All that is returned is a blank page. Looks like I hadn't tested throughly enough.
Comment #6
paul-at-murphymaphia.com commentedThe module needs updating to use the Forms API. I would do it myself and post it but it would be a month before I could get to it.
Can we include legacy.ini to get it functional?
Comment #7
mhutch commentedThis is a fairly quick patch. I haven't tested it fully, especially the features I don't use.
I updated to the Forms API, and updated the RSS feeds to deal with the new node/revision split. It includes the previous patch.
There were a couple of places where the new form API was not appropriate
-- the lists of quotes. I changed to use GET instead of POST.
-- the list of blocks, as the names and titles should be edited individually, else it won't scale.
Could someone review, and if the code is relatively bug-free it should be okay for a 4.7 release.
Comment #8
inteja commentedApplied patch. Mostly works but "My Quotes' page produces error:
warning: implode(): Bad arguments. in /home/vrealms/public_html/includes/form.inc on line 274.
Comment #9
mhutch commentedBrianH: That's strange... I don't get that error. Could you add some debugging prints to find out what the bad arguments are? The error is in Druapl core, on one of the Forms API error handling functions, but there's no Forms API use on that page.
Comment #10
inteja commentedI should point out that my Drupal install isn't exactly clean. I backed up the Drupal 4.6 database, installed 4.7b6 on a new server, pointed it to the old 4.6 database and ran the update script. This worked fine for the Drupal core, but now I'm going through each of the modules and updating where necessary, so this issue I'm having with the atched quotes module could be entirely my doing.
Back to the issue. I added a print_r() to form.inc and here's the output:
Array ( [#name] => sort [#title] => Sort by [#value] => n.created [#options] => Array ( [n.created] => creation date [n.title] => title [q.author] => author ) )
Array ( [#name] => sort [#title] => Sort by [#value] => n.created [#options] => Array ( [n.created] => creation date [n.title] => title [q.author] => author ) )
Array ( [#name] => order [#title] => Ordering [#value] => DESC [#options] => Array ( [ASC] => ascending [DESC] => descending ) )
Array ( [#name] => order [#title] => Ordering [#value] => DESC [#options] => Array ( [ASC] => ascending [DESC] => descending ) )
Array ( [#name] => limit [#title] => Quotes per page [#value] => 10 [#options] => Array ( [10] => 10 [25] => 25 [50] => 50 [75] => 75 [100] => 100 ) )
Array ( [#name] => limit [#title] => Quotes per page [#value] => 10 [#options] => Array ( [10] => 10 [25] => 25 [50] => 50 [75] => 75 [100] => 100 ) )
Any ideas what could be wrong?
Also I've noticed that quote blocks display fine for both anonymous users and logged in users but the quote content shows "n/a" in place of the actual quote and author when you're logged out (anonymous).
Comment #11
inteja commentedSomething else strange is that when I go to edit my old quotes now, the mandatory "Title" field is blank, although the quote title is still shown at the top of the page. Could this have something to do with the errors I'm seeing?
Comment #12
mhutch commentedOkay, I get those errors now I've looked in the log. I had writing errors to pages tuned off and it displays fine. Although I'm not using the forms API I am using the forms theming functions, and somehow the forms API appears to be kicking in. Will look into it.
None of my quotes have titles, so have not seen that. Will check.
I can see quote block content when logged out. Are you using access filtering in any way?
Comment #13
mhutch commentedFixed the first two. Need feedback on the access permissions bug before I can fix it.
Comment #14
inteja commentedThanks for the patch!
I had trouble applying it though with cygwin - 15 failures against HEAD and HEAD + previous patch.
I'll look into the access permissions.
Comment #15
mhutch commentedThe patch is against HEAD. What were the errors? It may be that patch is treating it differently because I called it .patch instead of .diff.
Comment #16
inteja commented$ patch < quotes_3.patch
patching file quotes.module
Hunk #1 succeeded at 163 (offset 7 lines).
Hunk #2 FAILED at 196.
Hunk #3 FAILED at 248.
Hunk #4 FAILED at 466.
Hunk #5 FAILED at 679.
Hunk #6 FAILED at 706.
Hunk #7 FAILED at 732.
Hunk #8 succeeded at 763 with fuzz 1 (offset -23 lines).
Hunk #9 succeeded at 1019 (offset 107 lines).
Hunk #10 FAILED at 1076.
Hunk #11 FAILED at 1084.
Hunk #12 succeeded at 1139 with fuzz 1 (offset 111 lines).
Hunk #13 FAILED at 1165.
Hunk #14 FAILED at 1209.
Hunk #15 FAILED at 1230.
Hunk #16 FAILED at 1248.
Hunk #17 FAILED at 1327.
Hunk #18 FAILED at 1406.
Hunk #19 FAILED at 1438.
15 out of 19 hunks FAILED -- saving rejects to file quotes.module.rej
Comment #17
mhutch commentedPatch works fine on Ubuntu Dapper using patch 2.5.9 and freshly downloaded CVS quotes.module.
Here's a patched version of the module anyway.
Comment #18
inteja commentedI had a look at access permissions as you suggested, but it seems to be something to do with input filters.
It warrants a separate issue report: http://drupal.org/node/55989
Comment #19
green monkey commentedI'm not very good at patches, some I get right.. others get me.
Has this patch already been applied to the CVS version for 4.7?
Thanks
Comment #20
mhutch commentedNo, it hasn't yet. No-one with CVS access has looked at this.
If you don't want to use the patch, use the full module posted in #17.
The patch still needs the bugfix from http://drupal.org/node/55989, but I won't be able to create an updated patch for a little while (long story). Till then you can apply the fix manually. I have a couple of other minor changes in my local copy too too..
Comment #21
murari commentedwhen mass importing quotes in drupal 4.7 I get this error:
Fatal error: Call to undefined function: array2object() in /home/mur109/public_html/modules/quotes/quotes.module on line 1010
the normal 1 quote at a time works...
Comment #22
jhriggs commentedI have been working on the 4.7 update apart from this issue/thread. I am doing a fairly significant refactoring of all the code in the process. This includes using FormsAPI, the .install system, and some general reformatting. I hope to finish up in the next several days. Hopefully posting this will keep me on task...you can all hold me accountable. ;-)
Comment #23
jhriggs commentedUgh. Didn't mean to change the title.
Comment #24
michelleGlad to hear it's coming. Then I can get rid of the Lorem Ipsum placeholder in my theme. :)
Thanks!
Michelle
Comment #25
jhriggs commentedThe 4.7 changes were committed to CVS and tagged last night.
Comment #26
(not verified) commented