I've upgraded from D6 to D7 and I have installed Meta tags quick. On the General tab of the configuration, I have checkmarks on Abstract, Description and Keywords for the Content Entity type.
I did not uninstall Nodewords from my D6 installation because I hoped to have the data in the nodewords and nodewords_custom tables updated to the D7 Meta tags quick format. A dump of these two tables is attached.
When I run the UPGRADE FROM NODEWORDS utility, I get the following error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=17&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (n.id IN ('1', '3', '4', '14', '15', '17', '19', '20', '21', '22'))' at line 1: SELECT n.id AS id, n.name AS name, n.content AS content FROM {nodewords} n WHERE (n.name IN ()) AND (n.id IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9)) ; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 3 [:db_condition_placeholder_2] => 4 [:db_condition_placeholder_3] => 14 [:db_condition_placeholder_4] => 15 [:db_condition_placeholder_5] => 17 [:db_condition_placeholder_6] => 19 [:db_condition_placeholder_7] => 20 [:db_condition_placeholder_8] => 21 [:db_condition_placeholder_9] => 22 ) in metatags_quick_convert_metatags() (line 129 of /home/gippy/truthunity.com/sites/all/modules/metatags_quick/nodewords_upgrade.inc).
I'd appreciate any help on how to populate the meta tags quick fields with the old Drupal 6 Nodewords tables.
| Comment | File | Size | Author |
|---|---|---|---|
| truthunity-nodewords-table.sql_.gz | 23 KB | gippy |
Comments
Comment #1
valthebaldproblematic part of the query is
WHERE (n.name IN ())My guess is that you didn't check 'Create fields' checkbox and meta fields were not created beforehand.
Is that right?
Comment #2
gippy commentedI found my problem, but I'm not sure what to do about it ...
the nodewords_edit variable is missing from the Variables table. The function metatags_quick_upgrade() in nodewords_upgrade.inc checks for the existence of the nodewords table, but does not check for existence of the nodewords_edit variable. So when the form got displayed, it does not display any checkboxes for Fields to Import. I didn't see that it was missing until I looked at the code. I must have screwed-up somehow and wiped out this variable.
I thought I would just populate this variable in my D7 database, but the variable type has changed from longtext to longblob. I'm not proficient enough to figure out how to do that. Here is the value from my D6 nodewords_edit variable:
a:15:{s:11:"description";s:11:"description";s:8:"keywords";s:8:"keywords";s:8:"abstract";i:0;s:9:"canonical";i:0;s:9:"copyright";i:0;s:14:"dc.contributor";i:0;s:10:"dc.creator";i:0;s:7:"dc.date";i:0;s:14:"dc.description";i:0;s:12:"dc.publisher";i:0;s:8:"dc.title";i:0;s:8:"location";i:0;s:10:"pics-label";i:0;s:13:"revisit-after";i:0;s:6:"robots";i:0;}
The real solution is to go back to the the D6 database and start over. Thanks for your help. I need to be more careful ... I'm learning (the hard way).
Comment #3
valthebaldGreat to hear that the problem is found!
Good luck with your upgrade, I know it can be a real pain
Comment #4
gippy commentedI am so proud! I'm a newbie to Drupal, to PHP and to MySQL but I was able to work around this by editing the utility as follows:
// $fields = variable_get('nodewords_edit', array());
$fields = array("description", "keywords", "abstract");
// $options = drupal_map_assoc(array_keys($fields));
$options = drupal_map_assoc(array("description", "keywords", "abstract"));
I'm going to get a beer.
Comment #5
valthebaldCheers:)
Comment #6
valthebaldAfter second though, I think it would be better to add to the module code non-empty default if nodewords_edit variable is missing, something like variable_get('nodewords_edit', array('keywords', 'description'));
Comment #7
valthebaldFixed in -dev.