Problem/Motivation
Certain modules (TODO need example) set $messages in Drupal when their installer runs. In Project Browser, we should be able to show these messages after the installation completes successfully.
Steps to reproduce
Install a module that sets Drupal messages using Project Browser. (Note, the message is still in queue, so you see it when you navigate away to a new page, but at that point it's too disconnected from what caused the message to be set).
Proposed resolution
I believe we'll need to be able to poll for messages from Drupal after completing the installation task, and then display them using JS.
Issue fork project_browser-3504664
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3504664-latest
changes, plain diff MR !876
- 3504664-modules-that-set
changes, plain diff MR !785
Comments
Comment #2
phenaproximaWe have a clear pathway to doing this now.
In InstallerController::activate(), as we build the AJAX response, we could pull all messages out of the messenger service and add them to the response with the
MessageCommand.To test it, all we'd need to do is make TestActivator set a message or two in its activate() method when handing a specific (fake) extension, and then the test would just confirm that those messages show up on the frontend when that fake extension is activated.
Assigning to @kunal.sachdev for now.
Comment #5
kunal.sachdev commentedComment #6
phenaproximaThis seems really good and straightforward. A few relatively minor suggestions.
Comment #9
phenaproximaShippety-ship it.
Comment #11
chrisfromredfinBTW the test cases are colorbox & honeypot.
Comment #14
chrisfromredfinThis has been merged to 2.1.x and cherry-picked clean to 2.0.x. 🙌