While upgrading from 7.x-1.11-beta7 to 7.x-1.11-beta8, drush updatedb gave me the following errors:

PHP Fatal error: Cannot redeclare node_reference_field_schema() (previously declared in /usr/share/OpenChurch7/profiles/openchurch/modules/contrib/references/node_reference/node_reference.module:53) in /usr/share/OpenChurch7/profiles/openchurch/modules/contrib/references/node_reference/node_reference.install on line 29

Fatal error: Cannot redeclare node_reference_field_schema() (previously declared in /usr/share/OpenChurch7/profiles/openchurch/modules/contrib/references/node_reference/node_reference.module:53) in /usr/share/OpenChurch7/profiles/openchurch/modules/contrib/references/node_reference/node_reference.install on line 29
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare node_reference_field_schema() (previously
declared in
line 29


gr8britton’s picture

I tried the update via manual copy and run update.php. Got the same thing when trying to run update.php! Luckily, I just replaced the files with my backup files and it is OK.

Fatal error: Cannot redeclare node_reference_field_schema() (previously declared in /profiles/openchurch/modules/contrib/references/node_reference/node_reference.module:53) in /profiles/openchurch/modules/contrib/references/node_reference/node_reference.install on line 29

deantownsley’s picture

I just upgraded with no problems. Looking at the with-core tarball (openchurch-7.x-1.11-beta8-core.tar.gz), there is no file
there at all. I didn't check the other tarballs, but presumably it is in one of those (?). Sorry I can't help more, but maybe this helps someone else help you.

drupalninja99’s picture

Was the references module updated in my last update? I can check the update ticket? Is this issue in the references queue? I could roll back the references update if I need to.

j_ali’s picture

Yes; references went from 2.x-dev in beta7 to 2.0 in beta8. Haven't checked the references queue.


gr8britton’s picture

so, I would need to update the references module before applying the OpenChurch update?

Submitted this before seeing drupalninja's response.

drupalninja99’s picture

I need to test an upgrade again, I might want to rollback the references update or patch it if its messing things up.

drupalninja99’s picture

Have you tried clearing caches? It's weird bc I didn't have ANY db updates when I ran drush updatedb.

2 things to try:
1. Disable node_reference temporarily. Run updatedb and re-enable, try to run updatedb again, clear caches a buch
2. Download the old version (2x dev) to sites/all/modules. Run drush updatedb.

drupalninja99’s picture

I am doing another module/core update to day. I will retest upgrading from beta7

drupalninja99’s picture

Status: Active » Needs review

When beta9 gets packaged try to upgrade to that version.

drupalninja99’s picture

Status: Needs review » Postponed (maintainer needs more info)
j_ali’s picture

Sorry for the delay. beta 9 now works on my test server after using registry_rebuild. I can't get it working on my live server since registry_rebuild has stopped working on the live system with beta 9 installed (it works just fine with beta 7, so that's very odd). I'll keep at it.

drupalninja99’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)