Hi, I've just updated the metatag module to the latest -beta3 but I've found a problem. Fortunately I've done a backup before the update :-) .
The -beta3 version adds a new "language" column to metatag
table and every existing record is set to the default site language (on my website it has been set to "it", which is the default site language).
But when I create a new node the language field is filled with "und": I'm not using i18n and entity translation modules.
And now the bug: when you view a node the meta tag is visible in the HTML source code but when you open the node editing form the meta tag description field is filled with the default value "[node:summary]" instead of the value stored on the db (probably because it looks for "und" records, not "it").
I've tried to manually set the language field directly on the table but it doesn't fix the problem, I suppose that the binary blob contains some other data, I've not checked it yet
Now I'm reverting the DB and the old module version, I really hope for a cleaner upgrade path.
Thanks for the attention.
Comment | File | Size | Author |
---|---|---|---|
#11 | metatag-n1842868-11.patch | 8.99 KB | DamienMcKenna |
#7 | metatag-n1842868-7.patch | 5.17 KB | DamienMcKenna |
#3 | metatag-n1842868-3.patch | 5.19 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaArgh, the translation system has taken a bite. I'll see if I can fix this and roll out a beta4 soon.
Comment #2
FiNeX CreditAttribution: FiNeX commented@DamienMcKenn: thanks :-)
I'd like to share some simple thoughts about this issue:
*1) When updating the DB with metatag_update_7003(), instead of setting existing nodes to the default language would be possible to set the language field to the same language of each node?
*2) Why not update existing records data adding the correct language? The metatag data stores the language, so the update process should load the data and set the language like *1).
We have at least three scenarios:
A) single language website: my suggestions could be a simple way to solve the upgrade problem from a previous meta tag version :-)
B) multi language websites using i18n: meta tag data depends on the node language, and my suggestion could still be right.
C) multi site language websites using entity translation: probably in this case metatag module is not used because the entity translation support has just been added.... :-)
Thanks again for your attention and for the feedback!
Comment #3
DamienMcKennaOk, please try this on a backup of your site.
This resolves three things:
Please give a test on a backup of your site and let me know how it goes, if it works for you I'll roll this out immediately as beta4.
Comment #4
DamienMcKennaComment #5
FiNeX CreditAttribution: FiNeX commentedHi @DamienMcKenna, I've started doing the following test:
1) updated to beta3
2) updated the database
3) applied the patch
4) re-run the database update
update.php returns this error:
The patch makes a wrong use of db_delete and db_update: those method does not require to set the alias on the working table but the conditions are "m.field_name" instead of "field_name". Probably a wrong copy/paste from the select method.
Anyway, after manually fixing the patch and re-running it the problem seems fixed. Would you like to repost a new patch with the corrected queries? I will test it again and this time I will try to update from an older metatag module version too.
Thanks :-)
Comment #6
FiNeX CreditAttribution: FiNeX commentedP.S: don't try to change the db_update()/db_delete() adding the "m" alias like db_select(), it doesn't work because both require an array as second parameter:
Comment #7
DamienMcKennaGah, should have caught the query problem. Thanks.
Comment #8
FiNeX CreditAttribution: FiNeX commentedGreat, this patch works as expected, thanks :-)
Comment #9
DamienMcKennaI've committed the patch from #7 but I want to add proper BatchAPI usage before releasing the next beta.
Comment #10
FiNeX CreditAttribution: FiNeX commentedYou're right, it should be better. Thanks :-)
Comment #11
DamienMcKennaThis patch does two things:
I think this will cover both a) sites that weren't updated to beta3 yet, b) sites that were updated and possibly have some borked content.
Comment #13
DamienMcKennaComment #14
DamienMcKenna#11: metatag-n1842868-11.patch queued for re-testing.
Comment #15
DamienMcKennaI've committed the patch from #11.
Comment #16
DamienMcKennaFYI I tested this on a demo site with ~7000 nodes with different language values, it all seems to work ok.
Comment #17
DamienMcKennaI've released beta4, hopefully all will go well with the new release :)
Comment #18
FiNeX CreditAttribution: FiNeX commentedThanks again @DamienMcKenna :-)
Comment #20
willieseabrook CreditAttribution: willieseabrook commentedNot related to this issue, but exactly the same symptoms and thus Google brought me here, so for anybody else who ends up here with disappearing metatags but is not solved by the code update on this issue.
If you have administration language installed make sure admin_language_force_neutral is set to false in the administration languages page, otherwise administration languages unsets the language on the node, and metatags inserts the metatag record with undefined langauge. This, you can update your metatags, but only once and thereafter when you edit the node, the edit form is empty.
Comment #21
DamienMcKenna@willieseabrook: Thanks for identifying the problem, I've opened a new issue to work on improving compatibility, or at least provide a Huge Big Warning Message(tm): #1995564: Add warning about using Administrative Language module
Comment #21.0
DamienMcKennaRemoved unnecessary info and explained a bit better the bug.