Posts missing author and citations
Starbuck - June 24, 2008 - 11:50
| Project: | Quotes |
| Version: | 5.x-1.90 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Description
I'm not sure if this is related to the SQL error I reported earlier which occurred during an import of 6 quotes. All 6 quotes themselves are fine but the author and citation data is simply gone. It doesn't show up in editing. I'll check the database soon to see if the nodes are corrupted or if the data simply isn't there.

#1
Uh, oh. Maybe I should create a new alpha version. The fix for http://drupal.org/node/262635 changed the way the authors are saved and fixed a problem where they were sometimes not saved. You can try the -dev version -- make sure you run update.php because the table structures are changed.
#2
I just upgraded from an earlier version of quotes for six to alpha 5, and I had the same thing happen - a ton of errors on the upgrade trying to write the same author over and over again to the new authors table, and now a bunch - about 12? of my quotes are missing their author data. They didn't have citations yet, so I can't say if those would have been lost.
#3
Can you tell me what the error was?
#4
Tried the latest dev as suggested and saw all the database updates. Similar issue. Of two new items, the first one with a single line quote updated fine, the last one did not save the author or citation. This last one was a multi-line. If required I'll check to get a better feel for the exact conditions under which the update fails.
Attachments show screenshots before update and after update, with missing author/citation and also our pesky little duplicate entry error.
#5
AS I suggested in the other issue, please try it without epublish enabled.
#6
Can you tell me what the error was?
Well, like a dolt I didn't save off the errors into a file, but what I remember seeing was a bunch of errors where it seemed that the quote module was trying to write an author to the new authors table, and it failed because the author was already there.
#7
No further info provided, closing until it is.
#8
Upgrading from 5.x-1.x-dev to 5.x-1.90
Definite bug as stated by prior commenters. You can also add the related bug that the upgrade doesn't handle commas in the data either.
The site I was upgrading has hundreds of quotes and while testing bringing them up to D5.18 for upgrade to D6.x, the quotes module seems to have eaten every Author if there were multiple quotes by the same Author. Here are some of the errors for missing Author:
Duplicate entry 'Will Rogers' for key 2 query: INSERT INTO quotes_authors (name, bio) VALUES ('Will Rogers', ', 1879-19355') in /home/inetdes/public_html/winetest/includes/database.mysql.inc on line 174.
Duplicate entry 'Thomas Jefferson' for key 2 query: INSERT INTO quotes_authors (name, bio) VALUES ('Thomas Jefferson', ', c. 1787') in /home/inetdes/public_html/winetest/includes/database.mysql.inc on line 174.
Duplicate entry 'Aldous Huxley' for key 2 query: INSERT INTO quotes_authors (name, bio) VALUES ('Aldous Huxley', ', 1894-1963') in /home/inetdes/public_html/winetest/includes/database.mysql.inc on line 174.
Comma bug is as follows:
Prior to upgrade: Author: "Claud Cockburn, 1904-1981"
Post upgrade: Author: "Claud Cockburn"
Quotations are not part of the entered Author field.
#9
First, everything after the comma should have moved to the bios field.
Second, did it truly "eat" the authors, or did it just eliminate duplicates while pointing them all to the same row in the authors table? I agree that you should not have the warning messages.
#10
What "bios" field? If you mean "Citation:" field, it didn't make it there either.
Entry for Cockburn
Prior to upgrade:
Quote:
Never believe anything until it has been officially denied.
Author:
Claud Cockburn, 1904-1981
Post:
Quote:
Never believe anything until it has been officially denied.
Author:
Claud Cockburn
Citation:
{empty}
##############
And, yes, eaten. e.g. Gone, Disappeared, No Longer There..... 2 examples specifically related to the SQL errors.
Prior to upgrade:
Quote:
Chastity - the most unnatural of all the sexual perversions.
Author:
Aldous Huxley, 1894-1963
Post:
Quote:
Chastity - the most unnatural of all the sexual perversions.
Author:
{empty}
Citation:
{empty}
Prior to upgrade:
Quote:
Advertisements contain the only truths to be relied on in a newspaper.
Author:
Thomas Jefferson, 1743-1826
Post:
Quote:
Advertisements contain the only truths to be relied on in a newspaper.
Author:
{empty}
Citation:
{empty}
Nancy, I'm not sure I understand your resistance to keeping this bug open. This bug is a year old, and based upon the comments and examples given by the original posters, it clearly seems to be that a) There is a bug and b) The examples given of the bug give a fairly clear target of where to look in the code.
Whatever constructs the "INSERT INTO quotes_authors (name, bio) VALUES..." has one or more of: a syntactical problem, an SQL escaping problem, or a logic fault.
My best guess, without seeing the code, nor really knowing why or what's been changed with the module, is that the "not handling commas in the data" is an SQL escaping issue and the "dropping duplicate author entries" is a logic problem.
Also, Please do not put this bug back into an "I'm going to ignore it" status again. If you aren't going to attempt to fix it, then please follow proper Drupal procedures and change the status to "won't fix." That way someone else will.
Thank you,
Sam
#11
With that update, the "extra" stuff was moved into a bios field in the quotes_author table. Bios are maintained in the settings area. I am no longer maintaining the 5.x version, but if you wish to fix this issue, please submit a patch and I will commit it if someone else confirms that it works.
#12
See #11
#13
Thank you Nancy,
Thank you for making it perfectly clear you won't support items you produce.
This bug was opened in June 2008, you then constantly dumped it into a "maintainer needs more info" type status, no matter how much information you were given. After a year and a half you blow it off by not supporting 5.x. Great! Don't give a crap that people now CAN'T upgrade from D5.x to D6.x because of your attitude.
Seriously, the fix is what 6 to 10 lines? You spent more time writing whiny replies than it would have taken to fix it.
Thanks for the experience to learn not to trust using anything you make.
Jesus, it's no wonder there are hordes of people dumping D and installing WP.
Anyone reading this that's in the same boat, drop me an email for a fix. The fix won't include the Quotes module.
#14
Sam,
NancyDRU took this module on a couple of years ago. It was originally written by jhriggs. I'm not sure when Nancy came into the maintainership of the quotes module but she has done fairly well at maintaining it.
Yes there are issues with modules and bugs but I can attest that a bug that may only require 6-10 lines of code as you say may take a very long time to figure out. Drupal 5 core still is buggy in some places even with 6 out for well over a year. I am currently working on the 7.x-dev version of quotes and if you want then help me to get it up, I've been working on it since june well before code freeze.
How many bugs have you counted lately in WP and can WP do what Drupal can, I doubt it. It may be able to do some stuff better but I've had clients dump WP for Drupal and if my take is right Drupal is gaining ground on the CMS front not loosing it. They prefer the framework that drupal has to build on, it may not be an easy task but a do-able one.
I'm in the same boat as you on upgrades, my production sites run 5.x, I've upgraded some over to 6.x but none of them used the quotes module so I can't tell you if I would face your issues. The probabilities of problems is always an issue. I will have to face the 5-6-7 upgrade path knowing there will be problems somewhere. Look at how many 5.x modules there are that were NEVER converted to 6, that should tell you something in itself. You have a fix for your situation, great share it, more than likely you spent time learning Views to accommodate your needs which is fine since your fix does not require the quotes module.
Instead of ranting at Nancy, or any developer for that matter why not help out, share your knowledge. The developers who maintain these modules do it on their own time and that time adds up. There's no glory in maintainership, there may be satisfaction and there's always hassle. Developers do this because they want to give back to the community something in return for what the community has given them.