Updated: Comment 8

Problem/Motivation

During the development of the action module the config entity moved from the action module to the system module. However the config entity prefix is still action.action. This means that if you uninstall the action module and have views enabled you will suddenly lose functionality on admin/people.

Steps to reproduce:

  1. Enable views and action module
  2. Disable and uninstall action module
  3. Try to block user using the bulk operation form on admin/people

Proposed resolution

  • Change action config entity to system.action
  • Rename actions provided modules to system.action
  • We need to decide what to do about the custom actions created by the action module

Remaining tasks

Everything

User interface changes

N/a

API changes

Change in the config entity prefix from action.acton to system.action

This was discovered whilst working on #1776830: [META-1] Installation and uninstallation of configuration provided by a module that belongs to another module's API

Files: 
CommentFileSizeAuthor
#6 3-6-interdiff.txt800 bytesalexpott
#6 2082499.6.patch7.22 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 58,844 pass(es).
[ View ]
#3 2082499.3.patch7.13 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] 58,857 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#2 2082499.2.will_.fail_.patch1.54 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] 58,891 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

Comments

Tagging up

Status:Active» Needs review
StatusFileSize
new1.54 KB
FAILED: [[SimpleTest]]: [MySQL] 58,891 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

Here's a test that indicates we have a problem

StatusFileSize
new7.13 KB
FAILED: [[SimpleTest]]: [MySQL] 58,857 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

And here's a patch that:

  • changes action config entity to system.action
  • renames actions provided modules to system.action

Status:Needs review» Needs work

The last submitted patch, 2082499.3.patch, failed testing.

+++ b/core/modules/action/lib/Drupal/action/Tests/ActionUninstallTest.php
@@ -0,0 +1,52 @@
+    $this->assertTrue(entity_load('action', 'user_block_user_action', TRUE));

You have to provide a message here, or simpletest will try to var_export the whole entity.

Status:Needs work» Needs review
StatusFileSize
new7.22 KB
PASSED: [[SimpleTest]]: [MySQL] 58,844 pass(es).
[ View ]
new800 bytes

Good point.

Status:Needs review» Reviewed & tested by the community

This is perfect, thanks!

We should consider renaming action.module to action_ui.module, it might have helped catch our naming mistake earlier. It is similar to field_ui and views_ui, in that everything still works when it is disabled/uninstalled.

Title:Uninstalling action module removes actions created by the user moduleChange notice: Uninstalling action module removes actions created by the user module
Category:bug» task
Priority:Critical» Major
Status:Reviewed & tested by the community» Active
Issue tags:+Needs change record

Committed/pushed to 8.x

Will need a change notice.

Priority:Major» Normal
Status:Active» Fixed
Issue tags:-Needs change record

Title:Change notice: Uninstalling action module removes actions created by the user moduleUninstalling action module removes actions created by the user module
Category:task» bug
Priority:Normal» Critical

I updated https://drupal.org/node/2020549/revisions/view/2730703/2833053. Not sure this needed a standalone one, but now there can be no confusion

Status:Fixed» Needs work

Something in this change broke the actions in my contrib module. They have been named action.action.foo.yml. Now they are no longer read and loaded by the actions module.

See https://github.com/agentrickard/domain/tree/8.x-1.x/config

The tests here were working until this patch landed. https://github.com/agentrickard/domain/blob/8.x-1.x/lib/Drupal/domain/Te...

So at the least I think the change notice needs some guidance there on what contrib is supposed to do.

Status:Needs work» Fixed

The change notice points out the system. prefix - i.e. system.action.comment_unpublish_action.yml

So contrib should use system.action.foo.yml as well?

That is not clear in the change notice.

Updated.

Thanks @agentrickard - the action config entity type is provided by the system module - the action module is just a UI for it.

InformativeChangeNotices++ :)

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

Issue summary:View changes

Updated issue summary.