RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Aaqilyousuf
Aaqilyousuf
30 Sep 2025

Pull Request for Issue #46185

Summary of Changes

  • Replaced incorrect 'id' column with 'extension_id' in getParam() and setParams() methods of InstallerScript.
  • This ensures extension parameters are correctly retrieved and updated in the #__extensions table during installation or updates.

Testing Instructions

  1. Install or update an extension that uses `InstallerScript`.

  2. In the `script.php`, try to set a parameter:

    $this->setParams(\['my\_param' => 'test\_value'\], $extensionId);

  3. Retrieve the parameter:

    $value = $this->getParam('my\_param', $extensionId);

  4. Verify the value matches in the database (#__extensions table) under params.

  5. Before fix, the value would not be set/retrieved correctly. After the fix, it should work as expected.

Actual result BEFORE applying this Pull Request

  • setParams() fails to update extension parameters.
  • getParam() always returns null.
  • Installer scripts cannot manipulate extension parameters.

Expected result AFTER applying this Pull Request

  • setParams() correctly updates extension parameters in #__extensions.
  • getParam() correctly retrieves the parameter values.
  • Installer scripts work as intended.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Aaqilyousuf Aaqilyousuf - open - 30 Sep 2025
avatar Aaqilyousuf Aaqilyousuf - change - 30 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Sep 2025
Category Libraries
avatar Aaqilyousuf Aaqilyousuf - change - 30 Sep 2025
The description was changed
avatar Aaqilyousuf Aaqilyousuf - edited - 30 Sep 2025
avatar Aaqilyousuf Aaqilyousuf - change - 30 Sep 2025
Labels Added: PR-5.3-dev
avatar joomdonation
joomdonation - comment - 30 Sep 2025

Thanks for your work. However, this is not a complete fix. Please look at this block of code https://github.com/joomla/joomla-cms/blob/5.3-dev/libraries/src/Installer/InstallerScript.php#L137-L141 , $this->paramTable could be #__modules or #__extensions, so you cannot always uses extension_idas the column name. It must be determined base on the value of$this->paramTable` (an if/else is needed here)

avatar Ruud68
Ruud68 - comment - 30 Sep 2025

what @joomdonation said, this will break potentially things for people depending on id in their $this->paramTable

avatar Ruud68 Ruud68 - test_item - 1 Oct 2025 - Tested successfully
avatar Ruud68
Ruud68 - comment - 1 Oct 2025

I have tested this item ✅ successfully on 01405ca

Thanks for this, appreciate it!


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

avatar joomdonation joomdonation - test_item - 1 Oct 2025 - Tested successfully
avatar joomdonation
joomdonation - comment - 1 Oct 2025

I have tested this item ✅ successfully on 01405ca


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

avatar joomdonation joomdonation - change - 1 Oct 2025
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 1 Oct 2025

RTC


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

avatar Aaqilyousuf
Aaqilyousuf - comment - 3 Oct 2025

@rdeutz can you verify and merge it, as the issue is already closed.

avatar richard67
richard67 - comment - 6 Oct 2025

@Aaqilyousuf We close an issue as soon as we have a PR for it.

avatar HLeithner
HLeithner - comment - 15 Oct 2025

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

avatar richard67 richard67 - change - 15 Oct 2025
Labels Added: RTC bug
avatar richard67 richard67 - change - 15 Oct 2025
Title
Fix InstallerScript using 'id' instead of 'extension_id' for #__extention
[5.4] Fix InstallerScript using 'id' instead of 'extension_id' for #__extension
avatar richard67 richard67 - edited - 15 Oct 2025
avatar richard67 richard67 - change - 16 Oct 2025
Labels Added: PR-5.4-dev
Removed: PR-5.3-dev
avatar richard67 richard67 - change - 16 Oct 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-10-16 11:50:07
Closed_By richard67
avatar richard67 richard67 - close - 16 Oct 2025
avatar richard67 richard67 - merge - 16 Oct 2025
avatar richard67
richard67 - comment - 16 Oct 2025

Thanks all (author and testers and reviewers).

Add a Comment

Login with GitHub to post a comment