Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2010 at 04:41 UTC
Updated:
6 Oct 2011 at 13:08 UTC
Jump to comment: Most recent
Comments
Comment #2
avpadernoI have marked #680478: Update failing from 6x-1.8 to 6x-1.11 as duplicate of this report.
Comment #3
avpadernoI have marked #681490: Update 6162 Fails When Upgrading Directly From 6.x-1.0 to 6.x-1.11 as duplicate of this report.
Comment #4
avpadernoThe code has been changed, and committed in CVS.
Thanks for the report, and the time took to investigate in the issue to Galiagante, and miketitsch.
Comment #5
avpadernoI have created a new version, which is not made visible from the project that handles the module versions.
Comment #7
alan d. commentedI know you hate issues being reopened, but there is nothing to let users to know what to do, so reopening with doco tag.
Should we manually update this field? Just ignore it till latter upgrades? Upgrade to a unreleased beta?
------------------------------------------------------------------------------------------------
As an aside, trying the update directly from this field 'id' from 6169 update code on 6.x-1.11 (which was the same code from 6162) fails. Is there something that is going to change the 'id' field between these two updates? If not, then this query will still fail here.
The cause as you probably know, is that MySQL 5 (windows issue?) isn't casting from '' to 0
-- my version
select version();
version()
5.1.37-community
-- Raw update SQL to run to do what that update was trying to do in a single SQL statement
UPDATE nodewords set id = '0' WHERE id = '' OR id IS NULL;
ALTER TABLE nodewords CHANGE `id` `id` INT unsigned NOT NULL DEFAULT 0;
[edit: The MySQL server is running in strict mode - this is not an issue otherwise]
Comment #8
Anonymous (not verified) commentedThe problem is how to resolve the issue for the sites for which the update didn't fail, and for the sites for which the previous update failed.
Comment #9
alan d. commentedGood to hear, just apply the fix. I'll pass that onto the guy doing 25+ updates :)
Thanks
If still an issue just re-run the two queries above. Null & empty strings can not be in the new data set, and a redundant alter call should not should break anything (untested).
Comment #10
Anonymous (not verified) commentedActually, I would prefer to fix the problem with code. Is there a way to get from Drupal the current datatype of a field? If that would be possible, then I can add an update function that updates the database only when the datatype is not correct; that would fix any problems.
Comment #11
Anonymous (not verified) commentedI added an update function that changes back the field datatype to varchar, changes the values saved in the database as suggested, and then it changes the datatype to integer. I hope this solve the problem.
Comment #12
vikingew commentedThere is an error in this code:
on the next to last line there is a comma which in the dev version causes
Parse error: syntax error, unexpected ')' in /var/www/www.domain.com/htdocs/sites/all/modules/nodewords/nodewords.install on line 1075Note the comma is on line 1074
Comment #13
vikingew commentedAnd while I am on it, this commit in same set:
causes a
An error occurred. http://venus.astrocalc.com/update.php?id=4&op=do <br /> <b>Parse error</b>: syntax error, unexpected T_VARIABLE in <b>/var/www/www.domain.com/htdocs/sites/all/modules/nodewords/nodewords_tokens/nodewords_tokens.install</b> on line <b>76</b><br />due to missing end semicolon for the 'variable_del' function.
Comment #14
vikingew commentedoohh jeezz there is more, you also removed the opening comment tag for next function in that commit, so you have
making it crashing badly. Ush what was you smoking that day? ;-)
Comment #15
vikingew commentedso of course, it's not fixed ;-)
Comment #16
vikingew commentedand huh even more, nodewords_admin.module also crashes from this commit as you left out a
}somewhere, probably the one in the end closing up the function. Well well we all have our days and this surely wasn't yours - but that one of the occations it's great to belong to a community stepping in for ya! ;-)Comment #17
vikingew commentedthis is how I think that last function should be
Comment #18
Anonymous (not verified) commentedComment #19
Anonymous (not verified) commentedThe code has been fixed, and committed in the repository.
The function has been changed to
Thanks for your report.
Comment #20
Anonymous (not verified) commentedI have marked #794730: Update #6162: schema change failures as duplicate of this report.
Comment #21
hass commentedSo, this is first fixed in 1.12?
Comment #23
patrickroma commentedIs this ==> http://drupal.org/node/681080#comment-2463532 the 6x.1.11 Version without the smallint issue then? So should we update to this version? Maybe someone could give a hint how to patch the 6x.1.11 for all people who are using this module-version on production sites? Any help would be really appreciated.