DANGER! uninstalling may delete views, blocks

Created on 16 November 2018, about 6 years ago
Updated 18 April 2024, 9 months ago

I tried updating from 8.x-1.1 to 8.x-2.1. Running update.php or drush updb gave me errors. Then I decided to uninstall the version 8.x-1.1 and install and re-configure the 8.x-2.1.
Uninstalling the 8.x-1.1 completely deleted all my custom views and blocks. Luckily I had a backup of the whole website.
Of course, Drupal gives a warning that all these views will be deleted.

Here is how I tried to update from 1.1 to 2.1
I removed the module directory with 1.1 files and replaced it with directory with 2.1 files
Tried to run drush updb and got this:

-------
drush updb
The following updates are pending:

hide_revision_field module :
8201 - Update settings.
8202 - Perform entity updates.
8203 - Set revision field weight

Do you wish to run all pending updates? (y/n): y
Error: Call to a member function setComponent() on null in /var/www/drupal8/modules/contrib/hide_revision_field/hide_revision_field.install on line 41 #0 phar:///usr/local/bin/drush/commands/core/drupal/update.inc(60): hide_revision_field_update_8201(Array)
#1 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(163): drush_update_do_one('hide_revision_f...', 8201, Array, Object(DrushBatchContext))
#2 phar:///usr/local/bin/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#3 phar:///usr/local/bin/drush/includes/batch.inc(98): _drush_batch_command('321')
#4 phar:///usr/local/bin/drush/commands/core/drupal/update.inc(230): drush_batch_command('321')
#5 phar:///usr/local/bin/drush/commands/core/core.drush.inc(1227): _update_batch_command('321')
#6 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_updatedb_batch_process('321')
#7 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#8 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('321')
#9 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#10 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 phar:///usr/local/bin/drush/includes/startup.inc(462): drush_main()
#12 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
#13 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#14 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#15 {main}
Error: Call to a member function setComponent() on null in hide_revision_field_update_8201() (line 41 of /var/www//drupal8/modules/contrib/hide_revision_field/hide_revision_field.install).
Drush command terminated abnormally due to an unrecoverable error. [error]
Cache rebuild complete. [ok]
Finished performing updates.
--------

update.php gives this:

An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference.
Please continue to the error page

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

--------------

uninstalling deletes all views

πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States gintass

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024