RTC PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Mahesh-Gite-28
Mahesh-Gite-28
27 Apr 2026

Summary of Changes

Replace str_replace("\n", ' ', print_r($values, 1)) with
json_encode($values, JSON_UNESCAPED_SLASHES) in three JDEBUG-only
debug log statements inside BaseController.

Affected methods

  • checkEditId()
  • holdEditId()
  • releaseEditId()

Testing Instructions

  1. Enable JDEBUG in Joomla configuration.

  2. Trigger actions that call:

    • checkEditId()
    • holdEditId()
    • releaseEditId()
  3. Verify log output.

Ensure that:

  • Logs are generated correctly
  • Output is in JSON format
  • No functional behavior is affected

Actual result BEFORE applying this Pull Request

Debug logs used print_r() combined with str_replace(),
producing verbose and less readable output with unnecessary processing overhead.

Expected result AFTER applying this Pull Request

Debug logs use json_encode(), producing cleaner, compact, and
more efficient single-line output without extra processing.

Link to documentations

  • No documentation changes for guide.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar Mahesh-Gite-28 Mahesh-Gite-28 - open - 27 Apr 2026
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 27 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Apr 2026
Category Libraries
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 27 Apr 2026
The description was changed
avatar Mahesh-Gite-28 Mahesh-Gite-28 - edited - 27 Apr 2026
avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 11 May 2026
Labels Added: PR-6.2-dev
avatar brianteeman
brianteeman - comment - 11 May 2026

I have tested this but I dont know if its better or worse or expected

This is the log from opening and saving a module

Before

2026-05-11T11:05:13+00:00	INFO	127.0.0.1	controller	Holding edit ID com_modules.edit.module.132 Array (     [0] => 132 ) 
2026-05-11T11:05:13+00:00	INFO	127.0.0.1	controller	Checking edit ID com_modules.edit.module.132: 1 Array (     [0] => 132 ) 
2026-05-11T11:05:19+00:00	INFO	127.0.0.1	controller	Releasing edit ID com_modules.edit.module.132 Array ( ) 

After

2026-05-11T11:03:42+00:00	INFO	127.0.0.1	controller	Holding edit ID com_modules.edit.module.132 [132]
2026-05-11T11:03:42+00:00	INFO	127.0.0.1	controller	Checking edit ID com_modules.edit.module.132: 1 [132]
2026-05-11T11:03:45+00:00	INFO	127.0.0.1	controller	Releasing edit ID com_modules.edit.module.132 []
avatar joomdonation
joomdonation - comment - 11 May 2026

I think the change is OK. In case we need to check the log, we would want to see ID of items currently being edited. I think [132, 133] for example is cleaner and easier to check than Array ( [0] => 123 [1] => 124 )

@Mahesh-Gite-28 Since $values is just an array of integer, any reasons you use json_encode($values, JSON_UNESCAPED_SLASHES) in your case? Personal, I think it just need to be json_encode($values) or even simpler just simple '[' . implode(', ', $values) . ']' (Not a big thing anyway)

avatar Mahesh-Gite-28
Mahesh-Gite-28 - comment - 11 May 2026

Thanks for the suggestion.

You’re right, since $values only contains integer arrays, JSON_UNESCAPED_SLASHES is unnecessary here.

I’ve updated it to use json_encode($values).

avatar Mahesh-Gite-28
Mahesh-Gite-28 - comment - 14 May 2026

Hi

I’ve addressed the review feedback and updated the implementation accordingly.
All checks are passing now.

Could someone please take another look when convenient?
Thanks!

avatar Mahesh-Gite-28
Mahesh-Gite-28 - comment - 14 May 2026

Hi @joomdonation 👋

I’ve addressed the review feedback and updated the implementation accordingly.
All checks are now passing.

Could you please take another look when convenient?
Thanks!

avatar joomdonation joomdonation - test_item - 14 May 2026 - Tested successfully
avatar joomdonation
joomdonation - comment - 14 May 2026

I have tested this item ✅ successfully on 960cde7


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

avatar joomdonation
joomdonation - comment - 14 May 2026

I have tested this item ✅ successfully on 960cde7


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

avatar joomdonation
joomdonation - comment - 14 May 2026

@Mahesh-Gite-28 Looks good to me. We still need 2nd test and then hopefully the PR will be accepted.

avatar QuyTon QuyTon - test_item - 14 May 2026 - Tested successfully
avatar QuyTon
QuyTon - comment - 14 May 2026

I have tested this item ✅ successfully on 960cde7


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

avatar QuyTon
QuyTon - comment - 14 May 2026

I have tested this item ✅ successfully on 960cde7


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

avatar QuyTon QuyTon - change - 14 May 2026
The description was changed
Status Pending Ready to Commit
avatar QuyTon
QuyTon - comment - 14 May 2026

RTC


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

avatar QuyTon QuyTon - edited - 14 May 2026
avatar QuyTon
QuyTon - comment - 14 May 2026

RTC


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

avatar Mahesh-Gite-28 Mahesh-Gite-28 - change - 18 May 2026
Labels Added: RTC

Add a Comment

Login with GitHub to post a comment