At present revert is the same as delete, the problem is that delete operation removes bean contents and fields attached to the bean_type bundle. The result of revert must be the same as if you revert from features: only delete the bean_type from database.

CommentFileSizeAuthor
#1 bean-1785950.patch7.36 KBjonhattan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonhattan’s picture

Status: Active » Needs review
FileSize
7.36 KB

Patch to separate both operations. It includes code from patch in #1710256-7: «Delete block type» button misplaced.

indytechcook’s picture

Status: Needs review » Needs work

Thanks jonhattan! Overall I like where this is going. Just a few comments.

+++ b/bean_admin_ui/bean_admin_ui.admin.incundefined
@@ -138,16 +138,26 @@ function bean_admin_ui_type_form($form, &$form_state, $bean_type = NULL) {
+  if (!empty($bean_type->type)) {

Good check!

+++ b/bean_admin_ui/bean_admin_ui.admin.incundefined
@@ -138,16 +138,26 @@ function bean_admin_ui_type_form($form, &$form_state, $bean_type = NULL) {
+    $export_status = $bean_type->getExportStatus();

We can't assume that all bean types are provided by ctools exportables. This page is used by both bean types provided by beam_admin_ui and custom bean types.

+++ b/bean_admin_ui/plugins/custom.incundefined
@@ -13,18 +13,25 @@ class BeanCustom extends BeanPlugin {
+    ctools_export_crud_delete('bean_type', $this->type);

Thanks. This wasn't available when I first made bean

indytechcook’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pingwin4eg’s picture

Just a post scriptum:
in this patch you are using function ctools_export_crud_delete() that is not included.
@see #1856876: Call to undefined function ctools_export_crud_delete().