Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I don't know if this is important or not... or if it really has anything to do/ ad either, but... upgrading from 6.x-1.1 to 6.x-2.0-beta6, got this error when ran update.php
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/folder/public_html/folder/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /home/folder/public_html/folder/update.php on line 339.
never seen this before so... should I be worried?
Everything seems to be working OK.
Comments
Comment #1
Jeremy CreditAttribution: Jeremy commentedThis implies that one of the update functions you ran did not return an array as it's supposed to. It's possible that this is in one of the many supporting ad modules, however after a quick glance I can not find it. This should not be a problem, unless a required query was not run -- but most likely the update used db_query rather than update_sql, or was doing something else. If you saw the update number that failed, we could dig into this further. Otherwise, there's not much to offer you, sorry. Your installation is probably fine.
Comment #2
aharown07 CreditAttribution: aharown07 commentedOK. So far, not seeing any problems. Where would I find the "update number"? I may have it in the error logs yet?
Comment #3
aharown07 CreditAttribution: aharown07 commentedI've had some problems creep up since the update & error... namely #439900: field values do not save on add form... only on edit
I was able to return to a backup and attempt the update again. Got same error, and same broken cck fields everywhere. Before the update, the cck fields were working fine.
As far as update number goes, one is not specified in the error itself, but this is what the update.php run generated at the end...
The following queries were executed
ad module
Update #6004
ALTER TABLE {ad_statistics} ADD `extra` VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX extra (extra)
ALTER TABLE {ad_clicks} ADD `extra` VARCHAR(255) NOT NULL DEFAULT '', ADD INDEX extra (extra)
Update #6005
No queries
ad_image module
Update #6001
ALTER TABLE {ad_image} ADD `remote_image` VARCHAR(255) NOT NULL DEFAULT ''
Update #6002
ALTER TABLE {ad_image_format} ADD `max_size` INT unsigned NOT NULL DEFAULT '0'
ad_notify module
Update #6001
No queries
Update #6002
ALTER TABLE {ad_notify} ADD `template` INT unsigned NOT NULL DEFAULT 0
Update #6003
UPDATE {ad_notify} SET subject = REPLACE(subject, "%%sitename", "%%site-name")
UPDATE {ad_notify} SET body = REPLACE(body, "%%sitename", "%%site-name")
UPDATE {ad_notify} SET body = REPLACE(body, "%%max_views", "%%max_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%global_views", "%%global_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%last_year_views", "%%last_year_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%this_year_views", "%%this_year_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%last_month_views", "%%last_month_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%this_month_views", "%%this_month_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%yesterday_views", "%%yesterday_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%today_views", "%%today_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%last_hour_views", "%%last_hour_impressions")
UPDATE {ad_notify} SET body = REPLACE(body, "%%this_hour_views", "%%this_hour_impressions")
ad_report module
Update #5001
DELETE FROM {cache_menu}
The update.php lines refered to in the error are
174
$context['results'][$module][$number] = array_merge($context['results'][$module][$number], $ret);
339
foreach ($queries as $query) {
Comment #4
aharown07 CreditAttribution: aharown07 commentedProblem also occurs for me updating to 6.x-2.0-RC1 from 6x-1.1
Edit: fwiw, also occurs going from 6x1.1 to the Apr 17 6x-2.0-dev
Comment #5
Jeremy CreditAttribution: Jeremy commentedI appear to have duplicated your bug. What version of the ad module last worked for you? 6.x-1.1, or have you ever had a 6.x-2.0-betaX work for you?
Comment #6
Jeremy CreditAttribution: Jeremy commentedThis bug appears to be caused by enabling either the ad_channel module or the ad_weight_probability module. If you disable both of them, CCK seems to work perfectly. If you enable either or both, initial CCK node creation fails.
Marking as a critical bug, as 6.x-2.0 won't be released until this is solved.
Comment #7
Jeremy CreditAttribution: Jeremy commentedUpdating title.
Comment #8
Jeremy CreditAttribution: Jeremy commentedIf I comment out the hook_nodeapi in these modules, the problem goes away. I'm stepping away now, but will have more time to fix this later -- it should be a quick fix.
Comment #9
Jeremy CreditAttribution: Jeremy commentedThe issue is a call to node_load from the 'insert' hook in nodeapi. This is preventing the node from being properly saved. I'll commit a fix later today.
Comment #10
Jeremy CreditAttribution: Jeremy commentedI guess it's later already. Fix committed.
Comment #11
aharown07 CreditAttribution: aharown07 commentedSure enough. Disabled weight probability.
Nothing to do w/the update.php error then I guess... rather, the new ver itself. Thanks for the quick fix!
Comment #12
tomtom122 CreditAttribution: tomtom122 commentedThanks for the fix. That solved the problem.
Thx.
TomTom
Comment #13
aharown07 CreditAttribution: aharown07 commentedYep. Works nicely.
Still got a cck field problem but it's apparently unrelated so... separate issue.