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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Tagging up

alexpott’s picture

Status: Active » Needs review
FileSize
1.54 KB

Here's a test that indicates we have a problem

alexpott’s picture

FileSize
7.13 KB

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.

tim.plunkett’s picture

+++ 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.

alexpott’s picture

Status: Needs work » Needs review
FileSize
7.22 KB
800 bytes

Good point.

tim.plunkett’s picture

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.

alexpott’s picture

catch’s picture

Title: Uninstalling action module removes actions created by the user module » Change 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.

mtift’s picture

Priority: Major » Normal
Status: Active » Fixed
Issue tags: -Needs change record
tim.plunkett’s picture

Title: Change notice: Uninstalling action module removes actions created by the user module » Uninstalling action module removes actions created by the user module
Category: task » bug
Priority: Normal » Critical
tim.plunkett’s picture

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

agentrickard’s picture

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.

catch’s picture

Status: Needs work » Fixed

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

agentrickard’s picture

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

That is not clear in the change notice.

agentrickard’s picture

Updated.

alexpott’s picture

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.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.