It is something wrong with the Profile module I'm using together with the Commerce module and multilanguge module. I would like to uninstall all three modules and try to install them again, but it doesn't allow me as you can see below. How to proceed?

When I try to uninstall a module at /admin/modules/uninstall I get this error.

The website encountered an unexpected error. Please try again later.

Detailed error message:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pantheon.profile' doesn't exist: SELECT base_table.revision_id AS revision_id, base_table.profile_id AS profile_id FROM {profile} base_table LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\EntityStorageBase->hasData() (line 588 of /code/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

I have clear all cash and run cron, still same issue. It asks me to run this update script:


profile module

8003 - Removes the langcode key from the profile entity keys.
8004 - Add the uid entity key to profiles.
8005 - Rerun uid entity key addition after incorrect entity type fixed.
8006 - Install the `data` field.
8007 - Set the 'published' entity key.
8008 - Adds a storage schema for profile that adds a multi-column index.
8009 - Update revision fields.
8010 - Update the status field.
Add new revision settings to profile types.
Change the plugin ID of the delete action.
Change the plugin IDs of the publish and unpublish actions.
Show the profile form at user registration using the profile_form widget.
Replace the "profiles" view with the updated version.

commerce_tax module Add the tax_number field to customer profiles. Add the tax_number field to customer profile view displays.

I click on Apply pending updates. I get this error

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /update.php/start?id=44&op=do_nojs&op=do
StatusText: parsererror

Detail error log:

Error: Call to a member function hasKey() on null in profile_update_8003() (line 82 of /code/modules/profile/profile.install)
#0 /code/core/includes/update.inc(246): profile_update_8003(Array)
#1 /code/core/includes/batch.inc(295): update_do_one('profile', 8003, Array, Array)
#2 /code/core/includes/batch.inc(137): _batch_process()
#3 /code/core/includes/batch.inc(93): _batch_do()
#4 /code/core/modules/system/src/Controller/DbUpdateController.php(185): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#5 [internal function]: Drupal\system\Controller\DbUpdateController->handle('start', Object(Symfony\Component\HttpFoundation\Request))
#6 /code/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array(Array, Array)
#7 /code/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request))
#8 /code/update.php(28): Drupal\Core\Update\UpdateKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#9 {main}

1 Answer 1


The uninstall & updated errors are like symptoms of the same problem; your profile module installation has corrupted DB storage so the module can't remove its DB tables, or retrieve its entity definitions to upgrade it.

You'll need to do a manual recovery on in a test environment so you can fully uninstall then reinstall so it has functional DB schema again. Manually restore the profile table (or any other DB schema) that the modules needs, then attempt uninstalling again. Repeat this process so you're able to successfully uninstall the module, then re-install it so it has a functional schema.

Once you've confirmed the process works, perform it on your live DB (after backing it up).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.