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.

Command icon 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:

Comments

chrisfromredfin created an issue. See original summary.

phenaproxima’s picture

Assigned: Unassigned » kunal.sachdev
Issue tags: +Needs tests

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

kunal.sachdev made their first commit to this issue’s fork.

kunal.sachdev’s picture

Status: Active » Needs review
phenaproxima’s picture

Status: Needs review » Needs work
Issue tags: -Needs tests

This seems really good and straightforward. A few relatively minor suggestions.

chrisfromredfin changed the visibility of the branch 3504664-modules-that-set to hidden.

phenaproxima’s picture

Assigned: kunal.sachdev » Unassigned
Status: Needs work » Reviewed & tested by the community

Shippety-ship it.

tim.plunkett made their first commit to this issue’s fork.

chrisfromredfin’s picture

BTW the test cases are colorbox & honeypot.

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

This has been merged to 2.1.x and cherry-picked clean to 2.0.x. 🙌

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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