Hi

I inherited a site that used panels for the home page only. As the design of this page has changed, panels is no longer required.
I disabled it and than uninstalled assuming it would be removed from the drupal installation.

I created a basic page called 'home' and the url alias would not use /home - as there was something already using the alias - it turns out it was the original panels 'page'.

I then noticed the create content page in a non-admin role has an option to create a new panel? The link just refreshed the page. There were no permissions for this content type.

I cleared the cache with devel, but the option was still there.

I reinstalled the panels module (Mini panels, Panel nodes,Panels & Panels In-Place Editor) and the data & content for the home page was still there, it had not been removed during the uninstall. I deleted this manually and it now seems to have gone.

But I could not figure out how to remove the create new panel link - only the admin had any access to the panels option, but it still showed up for all authenticated users. When I deleted the module, it removed the panel content type from admin/structure/types, but not from node/add

How do I completely remove the panels from Drupal 7?

thank you for your help
Ice70

Comments

Letharion’s picture

I never used Panel nodes, but it sounds like PN remains active. I don't think that's "stored in database", but it is a new content type registered by the module. Core shouldn't be showing it unless the module is active.

That's the best answer I can come up with at the time.

merlinofchaos’s picture

Status: Active » Closed (won't fix)
/**
 * Implementation of hook_uninstall().
 */
function panels_node_uninstall() {
  db_query("DELETE FROM {node} WHERE type = 'panel'");
  drupal_uninstall_schema('panels_node');
}

Panels does delete all panel nodes completely when the module is uninstalled. Please note that disabling a module is NOT uninstalling a module.

I performed a quick test, and after disabling the panel node module, I no longer had the option to create a 'panel' node. So I'm pretty sure there was a user error on this one and the module was not actually properly disabled.

lmeurs’s picture

Version: 7.x-3.2 » 7.x-3.4
Category: Support request » Bug report
Priority: Major » Normal
Issue summary: View changes
Status: Closed (won't fix) » Active

On our Drupal 7.26 installation panels_node_uninstall() removes all panel node records from the node database table, but after a complete uninstallation without error messages (on screen or in the logs):

  1. The panel node node type still exists in the node_types table (though the disabled field's value is 1);
  2. Values for attached fields still exist in the field_data_FIELD_NAME / field_revision_FIELD_NAME tables;
  3. Field instances for the panel node node type still exist in the field_instances table (the deleted field's value is 0).

When I call:

  node_type_delete('panel');

manually through the Devel PHP execution window:

  1. The node type is being removed from the node_type table;
  2. The field values are being removed from their respective tables;
  3. The field instances still exist in the field_instances table, but the deleted field value is now 1.

After clearing the caches and executing cron the field instances were removed as well.

Since hook_node_info() is used to register the node type, should the node type be removed automatically by Drupal on uninstallation of the module? The hook_node_info() API page says that node_type_delete() should only be used for user-provided node types which the Panels node type clearly is not.

I can provide a MySQL dump for further investigation or reproducing if necessary.

scotwith1t’s picture

Version: 7.x-3.4 » 7.x-3.5
Component: Code » Panel nodes

Same thing here. Panels_node did not delete the fields when the node type was deleted and this throws errors on pages like /admin/reports/fields where the fields exist still in the DB but there's no content type 'panel' for the fields added. For example, because comments were enabled when i was testing panels_node:

Notice: Undefined index: comment_node_panel in _field_ui_bundle_admin_path() (line 325 of ........../field_ui/field_ui.module).

Turned the module back on, user the UI to delete fields and disable commenting, then disabled and uninstalled the module to get rid of all errors. Thanks for fixing this when you can!

scotwith1t’s picture

Also, all variables defined by the module should be deleted when uninstalled. There are still quite a few variables from the 'panel' content type in the variables table as well.

DrupalGideon’s picture

I also got this message.

To get rid of it permanently I ran
drush php-eval "node_type_delete('panel')"
to get rid of the entry in the node_types table then I removed the field in the field_config_instance table too.
drush php-eval "db_delete('field_config_instance')->condition('bundle', 'comment_node_panel')->execute()"

I rebuilt registry using https://www.drupal.org/project/registry_rebuild and drush rr and cleared cache too.

It has hopefully cleared, but agree this should be taken care of when uninstalling the module. I also have about 25 entries in the variables table relating to panels.