I have noticied that method enqueueMessage() from JApplication has been marked as deprecated, but what is the replacement method for that ?

Thanks by advance

2 Answers 2


The entire JApplication class has been marked deprecated. Instead, you need to use JApplicationCms.

So to display an alert, you can use the following:

$app = JApplicationCms::getInstance('site');
$app->enqueueMessage('My Message here', 'success');

It's not deprecated on JApplicationCms, the best way to call it would be:

$app = JFactory::getApplication()
$app->enqueueMessage('My Message here', 'success');

See https://api.joomla.org/cms-3/classes/JFactory.html#method_getApplication for more details and to see that it returns JApplicationCms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.