Pending

User tests: Successful: Unsuccessful:

avatar Reda-Muhamed
Reda-Muhamed
12 Mar 2026

Pull Request resolves #47256

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Require the --live-site option when the Update Notification task is executed via CLI.
If the option is missing, the task logs a message and exits with Status::KNOCKOUT.

Testing Instructions

  1. Enable System - Joomla! Update Notification plugin.
  2. Run:
    php cli/joomla.php scheduler:run -i 3
  3. Verify the task exits with Status::KNOCKOUT and logs a message.
  4. Run:
    php cli/joomla.php scheduler:run -i 3 --live-site https://example.com/
  5. Verify the task runs normally.

Actual result BEFORE applying this Pull Request

Running the task via CLI without --live-site generates invalid URLs like:

https://joomla.invalid/set/by/console/application/

Expected result AFTER applying this Pull Request

If --live-site is missing, the task logs a message and exits early.
If --live-site is provided, the task runs normally.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Reda-Muhamed Reda-Muhamed - open - 12 Mar 2026
avatar Reda-Muhamed Reda-Muhamed - change - 12 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Mar 2026
Category Front End Plugins
avatar Reda-Muhamed Reda-Muhamed - change - 12 Mar 2026
Title
Fix: Require --live-site option for UpdateNotification task in CLI
[5.4] Require --live-site option when Update Notification task runs via CLI
avatar Reda-Muhamed Reda-Muhamed - edited - 12 Mar 2026
avatar Reda-Muhamed Reda-Muhamed - change - 12 Mar 2026
The description was changed
avatar Reda-Muhamed Reda-Muhamed - edited - 12 Mar 2026
avatar alikon
alikon - comment - 12 Mar 2026

imho i'll don't want to be so strict if the --live-site isn't provided a warning is enough

avatar Reda-Muhamed
Reda-Muhamed - comment - 12 Mar 2026

imho i'll don't want to be so strict if the --live-site isn't provided a warning is enough

Thanks for the feedback!

From my understanding of @bembelimen 's comment after the maintenance meeting, the idea was to require the --live-site option and return an error when it's missing.

Since the CLI environment doesn't know the site URL by default, I thought failing early would avoid generating invalid URLs like joomla.invalid.

But I'm happy to adjust it to just log a warning if you think that's the better approach.

avatar alikon
alikon - comment - 13 Mar 2026

I'm not a maintainer, I'm a volunteer like you, so I express my opinion and, in my humble opinion, it's better to have an update notification available, even with a wrong url inside the email, rather than not having it at all and a task error

avatar bembelimen
bembelimen - comment - 13 Mar 2026

As the update message without URL does not work, it's correct to give a proper log entry and a proper exit code and not executing the task any further.

avatar HLeithner
HLeithner - comment - 17 Mar 2026

This pull request has been automatically rebased to 6.2-dev.

avatar HLeithner HLeithner - change - 17 Mar 2026
Title
[5.4] Require --live-site option when Update Notification task runs via CLI
[6.2] Require --live-site option when Update Notification task runs via CLI
avatar HLeithner HLeithner - edited - 17 Mar 2026
avatar alikon alikon - test_item - 22 Jun 2026 - Tested successfully
avatar alikon
alikon - comment - 22 Jun 2026

I have tested this item ✅ successfully on 2952afe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47374.

avatar alikon
alikon - comment - 22 Jun 2026

I have tested this item ✅ successfully on 2952afe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47374.

avatar ThomasFinnern ThomasFinnern - test_item - 28 Jun 2026 - Tested unsuccessfully
avatar ThomasFinnern
ThomasFinnern - comment - 28 Jun 2026

I have tested this item 🔴 unsuccessfully on 2952afe

I am on windows wampserve.
After applying the patch i do get a change but an error message

e:\wamp64\www\jpatch_6_02>php cli/joomla.php scheduler:run -i 3 --live-site http://127.0.0.1/api_6x
Run Tasks
=========
In provider.php line 43:
  Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification::setMailerFactory()
scheduler:run [-i|--id ID] [--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] <command>

This may be a error which can now be seen but has nothing to do with the PR.

By the way, where can i see wrong URLS ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47374.
avatar ThomasFinnern
ThomasFinnern - comment - 28 Jun 2026

I have tested this item 🔴 unsuccessfully on 2952afe

I am on windows wampserve.
After applying the patch i do get a change but an error message

e:\wamp64\www\jpatch_6_02>php cli/joomla.php scheduler:run -i 3 --live-site http://127.0.0.1/api_6x
Run Tasks
=========
In provider.php line 43:
  Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification::setMailerFactory()
scheduler:run [-i|--id ID] [--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] <command>

This may be a error which can now be seen but has nothing to do with the PR.

By the way, where can i see wrong URLS ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47374.
avatar Reda-Muhamed
Reda-Muhamed - comment - 13 Jul 2026

I have tested this item 🔴 unsuccessfully on 2952afeI am on windows wampserve. After applying the patch i do get a change but an error message

e:\wamp64\www\jpatch_6_02>php cli/joomla.php scheduler:run -i 3 --live-site http://127.0.0.1/api_6x
Run Tasks
=========
In provider.php line 43:
  Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification::setMailerFactory()
scheduler:run [-i|--id ID] [--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] <command>

This may be a error which can now be seen but has nothing to do with the PR.

By the way, where can i see wrong URLS ?

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47374.

The invalid URL appears in the update notification email generated by the task. If the task runs without --live-site, Joomla falls back to https://joomla.invalid/..., so the link included in the email becomes invalid.

avatar ThomasFinnern
ThomasFinnern - comment - 28 Aug 2026

On a local windows instance Php 8.3.19 wamp server i got an error
After applying the patch the first test brings expected error.
The line with php cli/joomla.php scheduler:run -i 3 --live-site http://rsgallery2.org fails with following error
image
It may be created with another issue error though

avatar ThomasFinnern
ThomasFinnern - comment - 28 Aug 2026

On a local windows instance Php 8.3.19 wamp server i got an error
After applying the patch the first test brings expected error.
The line with php cli/joomla.php scheduler:run -i 3 --live-site http://rsgallery2.org fails with following error
image
The error may be created from another issue though

avatar muhme
muhme - comment - 28 Aug 2026

@Reda-Muhamed Tried to test with JBT Docker environment and seen before PR, but after PR I am getting red error

Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification::setMailerFactory()  

And every minute an email like:

In provider.php line 43:
                                                                               
  Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\Up  
  dateNotification::setMailerFactory()                                         
                                                                               

scheduler:run [-i|--id ID] [--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] <command>
avatar muhme
muhme - comment - 28 Aug 2026

@Reda-Muhamed Without the new option the cli command fails. But why not have the old functionality and use the unusable URL if the parameter is missing? In this case old cronjobs entries without the new parameter will not fail and if you give the new --live-site parameter you will have the given site URL in the email.

avatar richard67
richard67 - comment - 28 Aug 2026

@Reda-Muhamed Tried to test with JBT Docker environment and seen before PR, but after PR I am getting red error

Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification::setMailerFactory()  

And every minute an email like:

In provider.php line 43:
                                                                               
  Call to undefined method Joomla\Plugin\Task\UpdateNotification\Extension\Up  
  dateNotification::setMailerFactory()                                         
                                                                               

scheduler:run [-i|--id ID] [--all] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--live-site [LIVE-SITE]] [--] <command>

That could possibly be caused by the rebase.

Add a Comment

Login with GitHub to post a comment