No Code Attached Yet
avatar brbrbr
brbrbr
20 Jun 2024

Steps to reproduce the issue

enqueueMessage a message with type success or message in a CLI application

Expected result

message displayed as success in bright green

Actual result

message displayed as comment

Additional comments

CMSApplicationInterface::MSG_SUCCESS is not defined at all.

layouts/joomla/system/message.php does not map MSG_SUCCESS but here it work as the $type itself is used as fallback.

the $methodmap in ConsoleApplication::doExecute does not map 'success' nor 'message'

I have an installer script using enqueueMessage , would be nice to have the information colored in the CLI as well.

avatar brbrbr brbrbr - open - 20 Jun 2024
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jun 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Jun 2024
avatar brbrbr brbrbr - change - 20 Jun 2024
The description was changed
avatar brbrbr brbrbr - edited - 20 Jun 2024
avatar brbrbr brbrbr - change - 20 Jun 2024
The description was changed
avatar brbrbr brbrbr - edited - 20 Jun 2024
avatar alikon
alikon - comment - 21 Jun 2024

you can do like this

$this->ioStyle->success("User created!");

avatar brbrbr
brbrbr - comment - 21 Jun 2024

I'm looking at scripts that are designed to run in the Administror/Site Applications using enqueuMesage. In this case installation scripts.

The method ConsoleApplication::doExecute maps the types in the message queue to SymfonyStyle methods, however the methodMap is incomplete (compared to the joomla.system.message layout) and missing the success and message types.

I could rewrite my own installation scripts to distinguish between a Console and Administrator application, however, I do not control other packages. And ConsoleApplication::doExecute is designed to do the work for me.

avatar alikon alikon - change - 21 Jun 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-06-21 08:05:37
Closed_By alikon
avatar alikon alikon - close - 21 Jun 2024
avatar alikon
alikon - comment - 21 Jun 2024

closing as we have a pr #43688

Add a Comment

Login with GitHub to post a comment