GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
366 stars 170 forks source link

Database issue when upgrading to latest version #312

Closed jbaumgartner-ndi closed 7 years ago

jbaumgartner-ndi commented 9 years ago

After creating a new clean install, the site works fine. After moving old data from sql dump to the new server, there was a php error:

PHP Fatal error: require_once(): Failed opening required '/var/www/dkan/sites/all/modules/contrib/entity/includes/entity.wrapper.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/dkan/includes/bootstrap.inc on line 3198

The previous install had the entity.wrapper.inc file at this location:

/var/www/dkan/profiles/dkan/modules/contrib/entity/includes/entity.wrapper.inc

I'm not sure if that was due to a difference in installation. It would be nice if there was a clean way to upgrade the code while retaining the DB contents. Any suggestions on how to do this? I'd be happy to remove code and insert new code but that may not be ideal moving forward.

Thanks!

teosibileau commented 9 years ago

This is a drupal specific problem. You need to rebuild the registry.

Install registry rebuild

drush dl registry_rebuild

Rebuild registry

drush rr

that should do it.

jbaumgartner-ndi commented 9 years ago

Thanks! I did what you suggested and this was the output:

root@ip-10-233-63-181:/var/www/dkan# drush rr The registry has been rebuilt via registry_rebuild (A). [success] PHP Fatal error: Class 'Entity' not found in /var/www/dkan/profiles/dkan/modules/contrib/search_api/includes/index_entity.inc on line 11 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Class 'Entity' not found in /var/www/dkan/profiles/dkan/modules/contrib/search_api/includes/index_entity.inc, line 11

jbaumgartner-ndi commented 9 years ago

I also get this in the Apache error.log

[Mon Dec 15 22:25:36.792775 2014] [:error] [pid 24580] [client 216.185.19.10:64079] PHP Fatal error: Class 'EntityDefaultUIController' not found in /var/www/dkan/profiles/dkan/modules/contrib/og/includes/og.admin.inc on line 10

janette commented 7 years ago

@jbaumgartner-ndi could you review the upgrade instructions here: http://dkan.readthedocs.io/en/latest/introduction/maintaining.html#basic-upgrades and get back to us if you continue to have issues.