Hi,

Aegir freshly upgraded from 1.4 to 1.6. Prior to the upgrade none of these undefined properties existed. As part of the upgrade I upgraded from Drush 4.4 to 4.5. This is on RHEL 6 with PHP 5.3.3.

The following are output at the end of the log when cloning a site.

Undefined index: aliases hosting_clone.drush.inc:48
Undefined index: redirection hosting_clone.drush.inc:49
Undefined property: stdClass::$ssl_key hosting_ssl.nodeapi.inc:186
Undefined property: stdClass::$ip_addresses hosting.ip.inc:43
Undefined property: stdClass::$last_cron hosting_site.nodeapi.inc:151
Undefined property: stdClass::$old_vid hosting_site.nodeapi.inc:152
Undefined property: stdClass::$executed hosting_task.module:546
Undefined property: stdClass::$delta hosting_task.module:546
Undefined property: stdClass::$ssl_enabled hosting_ssl.nodeapi.inc:192
Undefined property: stdClass::$ssl_key hosting_ssl.nodeapi.inc:192
Undefined property: stdClass::$ssl_enabled hosting_ssl.nodeapi.inc:192

I suspect this has to do with the upgraded to Drush 4.5 as I also am now receiving the very annoying Function ereg() is deprecated file.inc:962 alert a kazillion times.

Comments

themusician’s picture

Component: Code » Drush integration
Status: Active » Needs review
StatusFileSize
new1.35 KB

All of these errors went away after patching drush/includes/environment.inc

I first tried using the following patch, http://drupal.org/files/issues/1120848_drush_error_handler_1.patch, but the patch balked at me. Perhaps a few lines of code have been added to 4.5 since the patch was made.

However, I remade the patch and have uploaded it here. Applying the patch solved the problem for me. No errors output to the log, and the Undefined property notices also dissappear.

steven jones’s picture

Status: Needs review » Needs work

Thanks for the patch but ignoring the notices is plainly the wrong way to go :)

I'll fix them instead.

steven jones’s picture

Status: Needs work » Fixed
themusician’s picture

Thanks for the proper fix.

omega8cc’s picture

Title: 6.x-1.6 generates multiple Undefined property errors on site import » 6.x-2.x generates multiple Undefined property errors on hostmaster install
Version: 6.x-1.6 » 6.x-2.x-dev
Status: Fixed » Needs work

This fix needs to be ported to 6.x-2.x:

Running profile specific task : profile [12.98 sec, 10.68 MB]                                                  [notice]
Constant HOSTING_DEFAULT_CLIENT already defined hosting.module:286 [12.98 sec, 10.68 MB]                       [notice]
Constant HOSTING_DEFAULT_DB_SERVER already defined hosting.module:287 [12.98 sec, 10.69 MB]                    [notice]
Constant HOSTING_DEFAULT_WEB_SERVER already defined hosting.module:288 [12.98 sec, 10.69 MB]                   [notice]
Constant HOSTING_ADMIN_CLIENT already defined hosting.module:293 [12.98 sec, 10.69 MB]                         [notice]
Constant HOSTING_OWN_DB_SERVER already defined hosting.module:295 [12.98 sec, 10.69 MB]                        [notice]
Constant HOSTING_OWN_WEB_SERVER already defined hosting.module:296 [12.98 sec, 10.69 MB]                       [notice]
Constant HOSTING_OWN_PLATFORM already defined hosting.module:297 [12.98 sec, 10.69 MB]                         [notice]
Constant HOSTING_DEFAULT_BASE_URL already defined hosting.module:304 [12.98 sec, 10.69 MB]                     [notice]
Undefined property: stdClass::$uname hosting_client.module:280 [12.98 sec, 10.7 MB]                            [notice]
Undefined property: stdClass::$nid hosting_server.service.inc:40 [12.98 sec, 10.7 MB]                          [notice]
Undefined property: stdClass::$vid hosting_server.service.inc:41 [12.98 sec, 10.7 MB]                          [notice]
Undefined property: stdClass::$nid hosting_server.service.inc:40 [12.98 sec, 10.7 MB]                          [notice]
Undefined property: stdClass::$vid hosting_server.service.inc:41 [12.98 sec, 10.7 MB]                          [notice]
Undefined property: stdClass::$revision hosting_server.module:341 [12.98 sec, 10.7 MB]                         [notice]
Undefined property: stdClass::$no_verify hosting_server.module:355 [12.98 sec, 10.7 MB]                        [notice]
Undefined property: stdClass::$executed hosting_task.module:563 [12.98 sec, 10.71 MB]                          [notice]
Undefined property: stdClass::$delta hosting_task.module:563 [12.98 sec, 10.71 MB]                             [notice]
Undefined property: stdClass::$revision hosting_server.module:341 [12.98 sec, 10.71 MB]                        [notice]
Undefined property: hostingService_db_mysql::$restart_cmd hosting_server.service.inc:57 [12.98 sec, 10.71      [notice]
MB]
Undefined property: stdClass::$no_verify hosting_server.module:355 [12.98 sec, 10.71 MB]                       [notice]
Undefined property: stdClass::$executed hosting_task.module:563 [12.98 sec, 10.71 MB]                          [notice]
Undefined property: stdClass::$delta hosting_task.module:563 [12.98 sec, 10.71 MB]                             [notice]
Undefined property: stdClass::$old_short_name hosting_package.module:253 [12.98 sec, 10.72 MB]                 [notice]
Undefined property: stdClass::$description hosting_package.module:253 [12.98 sec, 10.72 MB]                    [notice]
Undefined property: stdClass::$executed hosting_task.module:563 [12.98 sec, 10.72 MB]                          [notice]
Undefined property: stdClass::$delta hosting_task.module:563 [12.98 sec, 10.72 MB]                             [notice]
Undefined property: stdClass::$makefile hosting_platform.module:257 [12.98 sec, 10.72 MB]                      [notice]
Undefined property: stdClass::$verified hosting_platform.module:257 [12.98 sec, 10.72 MB]                      [notice]
Undefined property: stdClass::$platform_status hosting_platform.module:257 [12.98 sec, 10.72 MB]               [notice]
Undefined property: stdClass::$old_vid hosting_platform.module:258 [12.98 sec, 10.73 MB]                       [notice]
Undefined property: stdClass::$filename hosting_package.instance.inc:87 [12.98 sec, 10.73 MB]                  [notice]
Undefined property: stdClass::$version_code hosting_package.instance.inc:88 [12.98 sec, 10.73 MB]              [notice]
Undefined property: stdClass::$languages hosting_package.instance.inc:59 [12.98 sec, 10.73 MB]                 [notice]
Undefined property: stdClass::$old_short_name hosting_package.module:253 [12.98 sec, 10.73 MB]                 [notice]
Undefined property: stdClass::$description hosting_package.module:253 [12.98 sec, 10.73 MB]                    [notice]
Undefined property: stdClass::$site_language hosting_site.nodeapi.inc:144 [12.98 sec, 10.73 MB]                [notice]
Undefined property: stdClass::$ip_addresses hosting.ip.inc:43 [12.98 sec, 10.74 MB]                            [notice]
Undefined property: stdClass::$last_cron hosting_site.nodeapi.inc:151 [12.98 sec, 10.74 MB]                    [notice]
Undefined property: stdClass::$site_status hosting_site.nodeapi.inc:151 [12.98 sec, 10.74 MB]                  [notice]
Undefined property: stdClass::$verified hosting_site.nodeapi.inc:151 [12.98 sec, 10.74 MB]                     [notice]
Undefined property: stdClass::$old_vid hosting_site.nodeapi.inc:152 [12.98 sec, 10.74 MB]                      [notice]
Undefined property: stdClass::$executed hosting_task.module:563 [12.98 sec, 10.74 MB]                          [notice]
Undefined property: stdClass::$delta hosting_task.module:563 [12.98 sec, 10.74 MB]                             [notice]
omega8cc’s picture

Or is it a separate issue?

omega8cc’s picture

Status: Needs work » Patch (to be ported)

This giant patch is missing in 6.x-2.x

omega8cc’s picture

themusician’s picture

I concur that 1.7 introduces the bug referenced by omega8cc.

A test backup task after the upgrade claims it was executed on Wed, 12/31/1969 - 17:00.

omega8cc’s picture

Project: Provision » Hostmaster (Aegir)
Component: Drush integration » Code

Moving this to the correct queue.

omega8cc’s picture

I tested this patch with my forked copy, but it didn't help for 6.x-2.x, so there must be something 6.x-2.x unique, maybe because Provision 6.x-2.x is different?

omega8cc’s picture

Also, in the future, please separate whitespace cleaning as it makes the patch hard to read.

steven jones’s picture

Assigned: Unassigned » steven jones
StatusFileSize
new4.81 KB

Here's the patch I'm about to apply to hostmaster 6.x-2.x.

steven jones’s picture

Assigned: steven jones » Unassigned
Status: Patch (to be ported) » Fixed

Committed.

omega8cc’s picture

Status: Fixed » Needs work

Oh, no.

This patch introduces a known bug:

+  $node->executed = isset($node->executed) ? $node->executed : NULL;
+  $node->executed = isset($node->delta) ? $node->delta : NULL;

Plus, it doesn't resolve 6.x-2.x issues, as explained above.

steven jones’s picture

Status: Needs work » Fixed

No, I've fixed those further issues with the same follow up commits too.

This issue is about notices originally in 6.x-1.x, please raise a new issue for new notices in 6.x-2.x.

omega8cc’s picture

Just to confirm - all those "Undefined property" notices *are* fixed also in 6.x-2.x. Thanks!

Status: Fixed » Closed (fixed)

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

  • Commit 4969b65 on 6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by Steven Jones:
    Issue #1358768 by Steven Jones: Fixed 6.x-1.6 generates multiple...

  • Commit 4969b65 on 6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by Steven Jones:
    Issue #1358768 by Steven Jones: Fixed 6.x-1.6 generates multiple...