I have a production website running Commons 7.x-3.3. I made a copy of it in another folder with another database running on a separate port for testing purposes (for testing upgrading to 3.4). I extracted Commons 3.4 and deleted the sites folder and moved the sites folder from the test website's docroot into the Commons folder. I moved robots.txt and then renamed the old folder to docroot_old and the new one to docroot. I ran a script to reset the permissions on the file structure and then attempted to browse to update.php. However, I got the following error:
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
I get the same error if I try to browse to the home page, or sometimes this one:
Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /var/www/html/fctest/docroot/profiles/commons/modules/contrib/rules/modules/node.rules.inc on line 147
If I try to run drush cc all I get this error:
Fatal error: Class 'RulesEventHandlerEntityBundle' not found in /var/www/html/fctest/docroot/profiles/commons/modules/contrib/rules/modules/node.rules.inc on line 147
and if I try to run drush updatedb I get this error:
Fatal error: Cannot redeclare registry_rebuild_drush_help() (previously declared in /var/www/html/.drush/registry_rebuild/registry_rebuild.drush.inc:10) in /var/www/html/fctest/docroot/profiles/commons/modules/contrib/registry_rebuild/registry_rebuild.drush.inc on line 10
------
update-
I just tried running drush rr and that worked. Now when I run drush cc all I get this instead:
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
And now drush updatedb works, but it fails halfway through:
Do you wish to run all pending updates? (y/n): y
Performed update: commons_notify_update_7301 [ok]
Performed update: rules_update_7210 [ok]
Performed update: rules_scheduler_update_7203 [ok]
Performed update: rules_update_7211 [ok]
Performed update: commons_bw_update_7301 [ok]
Performed update: commons_update_3107 [ok]
Performed update: commons_notify_update_7302 [ok]
Performed update: field_update_7003 [ok]
PHP Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Unsupported operand types in
/var/www/html/fctest/docroot/modules/field/field.info.class.inc, line
479
The external command could not be executed due to an application [error]
error.
Finished performing updates. [ok]
Comments
Comment #1
japerryDid you try running update.php from the browser again? its likely not all of the update hooks have fired. Its required before you can clear caches.
Comment #2
ezra-g commentedTo add to japerry's comment: Please make sure you've followed the upgrade instructions at https://docs.acquia.com/commons/upgrade. Marking "needs more info" - let us know if this resolves your problem. Thanks!
Comment #3
jlea9378 commentedI'm unable to do anything now. And yes, I was following the directions.
Browsing to the site gives this error:
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
---------------------------------------
Running drush cc all:
PHP Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Unsupported operand types in
/var/www/html/fctest/docroot/modules/field/field.info.class.inc, line
479
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
------------------------------------------------------------------------
Running drush updatedb:
fclub@prod:~/fctest/docroot/sites/default$ drush updatedb
The following updates are pending:
system module :
7078 -
commons module :
3108 -
commons_bw module :
7302 -
commons_events module :
7010 -
commons_events_pages module :
7301 -
commons_groups module :
3113 -
commons_like module :
3000 -
commons_misc module :
7000 -
commons_notify module :
7303 -
commons_polls module :
7002 -
commons_posts module :
7003 -
commons_q_a module :
3108 -
commons_radioactivity_groups module :
7300 -
commons_search module :
7001 -
commons_site_homepage module :
7301 -
commons_wikis module :
7006 -
dblog module :
7002 -
image module :
7005 -
panels module :
7302 -
quicktabs module :
7303 -
rules module :
7212 -
rules_scheduler module :
7204 -
Do you wish to run all pending updates? (y/n): y
PHP Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Unsupported operand types in
/var/www/html/fctest/docroot/modules/field/field.info.class.inc, line
479
The external command could not be executed due to an application [error]
error.
Finished performing updates. [ok]
fclub@prod:~/fctest/docroot/sites/default$
Comment #4
japerryThis is due to the registry needing to be rebuilt. You can try to manually rebuilding it by typing 'drush rr'
Comment #5
jlea9378 commentedI already tried that and it didn't help. I just got an error (below). Is there something wrong with drush or the registry? This site is a copy of the production site. Perhaps there's something that I didn't do in the copy process?
fclub@prod:~/fctest/docroot/sites/default$ drush rr
PHP Fatal error: Cannot redeclare registry_rebuild_drush_help() (previously declared in /var/www/html/.drush/registry_rebuild/registry_rebuild.drush.inc:10) in /var/www/html/fctest/docroot/profiles/commons/modules/contrib/registry_rebuild/registry_rebuild.drush.inc on line 10
Fatal error: Cannot redeclare registry_rebuild_drush_help() (previously declared in /var/www/html/.drush/registry_rebuild/registry_rebuild.drush.inc:10) in /var/www/html/fctest/docroot/profiles/commons/modules/contrib/registry_rebuild/registry_rebuild.drush.inc on line 10
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare registry_rebuild_drush_help() (previously
declared in
/var/www/html/.drush/registry_rebuild/registry_rebuild.drush.inc:10)
in
/var/www/html/fctest/docroot/profiles/commons/modules/contrib/registry_rebuild/registry_rebuild.drush.inc,
line 10
fclub@prod:~/fctest/docroot/sites/default$
Comment #6
jlea9378 commentedI was able to resolve my problems running `drush rr` by removing the registry_rebuild folder from the commons module contrib folder. I also had the features module in my sites/all/modules folder which was causing a conflict as well. So I removed that. After that I was able to run `drush rr` successfully. However that still didn't get rid of the original error that I was seeing when running `drush cc all` or `drush updatedb`:
PHP Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Fatal error: Unsupported operand types in /var/www/html/fctest/docroot/modules/field/field.info.class.inc on line 479
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Unsupported operand types in
/var/www/html/fctest/docroot/modules/field/field.info.class.inc, line
479
The external command could not be executed due to an application [error]
error.
Since there is a new version of Commons out now, I will refresh my test site from production and start the process over again with Commons 3.5 (upgrading from 3.3).
Comment #7
jlea9378 commentedNote: I am encountering the same error upgrading from 3.3 to 3.5. I've created a new issue: #2156839: Fatal error: Class 'RulesEventHandlerEntityBundle' not found" when Upgrading
Comment #8
ezra-g commentedI'm sorry to hear that folks are having issues updating between versions of Commons 3.x. I've posted some suggested steps for resolution at #2156839: Fatal error: Class 'RulesEventHandlerEntityBundle' not found" when Upgrading. Marking this issue as a duplicate so that we can consolidate support efforts. Let's continue the conversation there.
Thanks!