I am trying to upgrade Drupal 7 with Ubercart to Backdrop CMS.

I am getting this error when updating core/update.php: "The update process was aborted prematurely while running update #1004 in metatag.module. All errors have been logged."

If I disable and uninstall the Metatag module and run update.php again, then other error pops up like 'update ### in cart.module' .

I disable and uninstall the Cart module and run update.php again, then other error pops up like 'update ### in cart_links. module'.

Any suggestions what to look for? Thank you.

Comments

Hi Wishlist.

A quick question (you may have already tried this). When you say "I disable and uninstall the Metatag module" do you mean in your D7 site? That's right way to do it, but then, be sure to completely wipe out the database, import it again, and completely remove the config folder that was created during the failed upgrade process. In other words, start the whole process again from scratch, but with Metatag disabled.

Also, be sure to double check the upgrade documentation - there are some D7 core and contrib modules that need to be disabled.

In general, we haven't seen issues with upgrading sites with Ubercart. 

If you upgrade fails again, see if you can access the database log to check on the exact errors and lines. If you get that, please post here.

Thank you for your help. I completely wipe out the database and import, and fresh install Backdrop CMS.

Hmm... something is really messed up.  It may be helpful if you could post a list of your enabled contrib modules to see if something is messing up the process.

I can guess where some of the warnings come from. But you may need to do some intense debugging/tests to see what's going on. I'd start by testing a basic upgrade in your environment, by upgrading a new installation of a vanilla D7 site. Then I'd try an upgrade of an empty site that has contrib modules enabled, matching the ones in your site.

From the error list, I can see that the first warning about the constant LOG_LOAD0 is actually a bug in system_update_1017(). According to this doc, that PHP constant is not available in Windows environments. This is caught and prevented in other places in Backdrop with if statements, like in syslog.module, but not in that update hook, unfortunately.

It's hard to tell if that first warning is causing the whole chain reaction of errors. You may want to patch that line in system_update_1017() to

$config->set('log_facility', update_variable_get('syslog_facility', 128));

(use 128 instead of the constant).

ALSO check if syslog is enabled in your D7 site. If it is, disable it and try the upgrade again.

The following warnings related to backdrop_schema_fields_sql are happening because Backdrop is trying to get the schema definition for a specific table, and not finding it. This may happen because the module that defines the schema is not enabled. This is probably being thrown off by a call to backrop_get_schema() for an entity whose module is not enabled (yet). This *may* be related to Ubercart, unless you have other contrib modules that define custom entities?

The warning from entity_plus_metadata_convert_schema() is produced by the same issue as above - trying to get the schema for a table that is not yet defined.

The next entity_plus warnings are probably related to that too.  

One interesting warning is the one related to rules_config. It's trying to get some columns from that particular entity table (rules_config are configuration entities), but it's not finding them. This may offer clues about what's wrong. It looks like Rules hasn't been enabled yet, and entity_plus is trying to operate on its rules_config entity. This may be the sign of a bug in Ubercart.

 

Finally, one more question: did you enable the "stub" D7 modules entity_plus and entity_ui? Try doing that in your D7 site and then try the upgrade again.  

 

 

If you are able to post a  list of enabled modules, that may help. I tried an upgrade of a site that had the 4 basic Ubercart modules enabled, plus rules, entity plus, entity token and entity UI, and did not run into any issue.

Here are the list of modules.

- Modules that can't  be disabled: Field Field SQL storage File Filter Image List Node Options System Text User Chaos tools Entity Reference EntityReference Count Link Weight Entiy API

-Stub modules (enabled):

-Uninstalled modules:

Do you see something that has to be disabled or uninstalled?

Thank you.

 

I was able to reproduce the problem. The issue is that you are using a contrib module, Entityreference Count, which doesn't exist in Backdrop. That module creates a new field type. When the update process tries to upgrade those fields to Backdrop, it fails.

You have two options: either disable and uninstall that module (which will remove the fields), or port the module to Backdrop. It doesn't look too complicated to port. You can otherwise try creating a post at https://github.com/backdrop-ops/contrib/issues to see if anyone is available to port  it.

-I could not 'unckeck' some contributed modules including EntityReference Count module so I ended up disabling them in phpmyadmin (status = 0).

-'Stub' modules on

-Export drupal.sql

-Create new backdrop CMS database to import drupal.sql

-Extract backdrop.zip and run update.php

-This error message shows.

I am not sure if my Drupal site is problematic to begin with. If Drupal /modules are up to date and there are no errors under admin/reports, am I good to upgrade to Backdrop CMS?

 

Manually modifying the database with a 0 for Entityreference Count is not the same as uninstalling the module. The module Entityreference Count creates specific field types, which have tables in the database. Those tables still exist in the database and will cause problems.

So the problem is very simple. You can't upgrade a site that uses contrib modules that don't exist in Backdrop, especially modules that create field types or entity types. You either have to disable/uninstall them, or port them.

In your case, you can't uninstall  Entityreference Count because its fields are in use in your site. Remove the fields completely in your D7 site, uninstall Entityreference Count from the UI (not the database) and try again.

- I click 'delete'  Entityreference Count field in my content type.

In error log: 'DatabaseSchemaObjectExistsException: Cannot rename field_data_field_entity_ref_count to field_deleted_data_57: table field_deleted_data_57 already exists.'

-I don't see the Entityreference Count field in content type any more.

-This module is still grayed out.

Is there another way to delete the field?