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

Jeremy’s picture

Status: Active » Fixed

This 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.

aharown07’s picture

OK. So far, not seeing any problems. Where would I find the "update number"? I may have it in the error logs yet?

aharown07’s picture

Status: Fixed » Active

I'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) {

aharown07’s picture

Version: 6.x-2.0-beta6 » 6.x-2.0-rc1

Problem 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

Jeremy’s picture

I 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?

Jeremy’s picture

Component: installation » ad module
Assigned: Unassigned » Jeremy
Category: support » bug
Priority: Normal » Critical

This 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.

Jeremy’s picture

Title: update.php error when updating to 6x2 beta 6 » CCK nodes do not save on initial creation when ad_channel or ad_weight_probability is enabled

Updating title.

Jeremy’s picture

If 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.

Jeremy’s picture

The 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.

Jeremy’s picture

Status: Active » Fixed

I guess it's later already. Fix committed.

aharown07’s picture

Sure 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!

tomtom122’s picture

Thanks for the fix. That solved the problem.

Thx.
TomTom

aharown07’s picture

Yep. Works nicely.
Still got a cck field problem but it's apparently unrelated so... separate issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.