Unable to uninstall submodules

Created on 13 March 2017, over 7 years ago
Updated 6 September 2023, about 1 year ago

Hello,
It is not possible to uninstall rh_node if you have previously set a value in rh_action and rh_redirect_response, even if if you set everything to default...

I had to empty all fields ; directly in the database ; to be able to uninstall rh_node and then rabbit_hole itself.

The checks are not done properly I think. Did not have enough time and knowledge to find how to fix this.

Thanks for your module.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France anou Collonges au Mont d'Or

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.

  • πŸ‡ΊπŸ‡¦Ukraine pazhyn Lutsk

    Uninstalling any submodule as well as the module itself works well on Drupal 10.0.2, PHP 8.1.13, Rabbit Hole 1.x

  • Status changed to Active almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    pazhyn: Did you configure the module when you installed it, so that there were active configurations?

    Instead of "RTBC", if the problem no longer exists then maybe "closed (outdated)" would be the appropriate status.

  • Status changed to Closed: cannot reproduce almost 2 years ago
  • πŸ‡ΊπŸ‡¦Ukraine pazhyn Lutsk

    DamienMcKenna: Yes. I did it once again now. Added different rabbit hole configurations for nodes and vocabulary, and uninstalled submodules again. Now errors on screen and logs.
    Thanks for the proper status advice. RTBC is not for my kind of update. Used Closed (cannot reproduce) instead.

  • πŸ‡ΊπŸ‡ΈUnited States cameron prince

    Here's the way I found to uninstall... I was running beta 1.0 on Drupal 9.5.10 and couldn't upgrade or uninstall the module.

    The uninstall was dying with:

    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rh_action' in 'where clause'

    The solution was to login to the database and add the missing columns, which the uninstall would then immediately remove. I think adding a hasTable() check would be the proper addition to the uninstall routines to resolve this.

    ALTER TABLE node_field_data ADD rh_action varchar(64);
    ALTER TABLE node_field_data ADD rh_redirect_response varchar(64);
    ALTER TABLE node_field_data ADD rh_redirect varchar(64);
    ALTER TABLE node_field_data ADD rh_redirect_fallback_action varchar(64);
    ALTER TABLE taxonomy_term_field_data ADD rh_redirect_fallback_action varchar(64)
    ALTER TABLE taxonomy_term_field_data ADD rh_redirect varchar(64);
    ALTER TABLE taxonomy_term_field_data ADD rh_redirect_response varchar(64);
    ALTER TABLE taxonomy_term_field_data ADD rh_action varchar(64);
    

    Keep in mind that if you enabled other submodules, you probably need to add the columns to the related entities as well. I only did terms and nodes.

Production build 0.71.5 2024