I disabled mods and upgraded from D6.4 to 6.5, uploading cck2.0-rc10 at the same time.
I believe my path to rc10 was from rc7, and before that, rc4.
after running update, I enabled mods.
content mod enabled ok, then when I enable anything with a dependency on content, it generates the following error:
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/pdxindie.com/subdomains/www/modules/cck/content.install on line 43.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/pdxindie.com/subdomains/www/modules/cck/content.install on line 43.
I'm still able to create new fields after enabling content field types.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | content_node_field.txt | 5.14 KB | miahawk |
| #3 | content_node_field_instance.txt | 6.03 KB | miahawk |
Comments
Comment #1
miahawk commentedjust upgraded to 6.6 and cck2.0 and the same thing happened, one error for each dependency.
Comment #2
yched commentedPlease note that disabling contrib modules is usually only needed for major cure upgrades (5.x -> 6.x), not for 'point releases' (x.3 -> x.4).
Now, the error you report is surprising - In normal circumstances,
unserialize($row['global_settings'])should always be an array.I'd be interested to take a look at a db dump of your 'content_node_field_instance' table. Could you provide this as a .txt attachment ? (or send it through my contact form, if you prefer)
Also, was your site upgraded from D5, or was it created in D6 ?
Comment #3
miahawk commentedHi, thanks for taking a look at this. I'd tried doing the upgrade from 6.3 to 6.4 and had so many issues that were only resolved by disabling and re-enabling modules that I just disabled all of them before going to 6.6.
the site was created in 6.3, so no legacy 5.x files/data would exist.
I did the requested dump and it is attached. everything seems to run properly, but since I don't know what the error actually means, it is a little freaky :)
Comment #4
yched commentedDoh, sorry, it's the 'content_node_field' table I need :-)
Comment #5
miahawk commentedhere you go :)
thanks again!
Comment #6
cindyr commentedI just upgraded Drupal and CCK tonight, and got the same errors. I found this on the site: http://drupal.org/node/130060
Since it's the same error, I tried the same fix and it seems to have worked:
content.install, line 43,
change
$field = array_merge($row, unserialize($row['global_settings']));to
$field = array_merge((array)$row, (array)unserialize($row['global_settings']));I re-ran update.php (which is when I got it, since I didn't disable my modules) and no errors the second time through. I then updated another site on the same server, and it didn't give me any errors either.
I don't have a clue exactly what I did or the consequences of it, it just looked like it might fix the problem and it appears to have. Until I find out I broke something else, I'm going to live in blissful ignorance.
Comment #7
yched commentedThis happens because you have a record in the content_node_field_instance table that has no corresponding entry in then content_node_field table (meaning : a field instance with no actual field definition). At least that's the case for miahawk, I'm ready to bet it's also true for cindyr.
Not sure how you got there, but that's a (minor) case of db inconsistency (easily fixed, see below), and :
- we don't babysit broken code or db,
- it is actually better to get a notion that something is wrong rather than silently failing. If we get tons of those reports, then we might need to check if our code currently leads to such inconsistencies,
so right now I won't change the code to prevent the error.
To fix your installs :
- open up phpMyadmin or whatever db admin tool you use
- run the following query :
(change table names if your db uses table prefixes)
Comment #8
amariotti commentedI just ran that query and it didn't find any rows to delete. Is there something I'm missing here?
I am in the process of upgrading to 6.x and get the error every time I run update.php.
UPDATE: Nevermind... looks like it fixed itself somehow. If it shows up again I'll post a follow-up here.
Comment #9
miahawk commentedthanks for the query. I ended up back here because I go the error on the most recent upgrade and it reoccured.
I did run the query and it effected 0 rows.