User tests: Successful: Unsuccessful:
Pull Request for Issue #45001 and #42236 .
remove warning
Go to System > Administrator Template Styles.
Edit Atum - Default.
Click Save button.
See PHP error log.
or
run
npx cypress run --spec '.\tests\System\integration\api\com_templates\Administrator.cy.js'
npx cypress run --spec '.\tests\System\integration\api\com_templates\Site.cy.js'
PHP Warning: Attempt to read property "parent" on array in \administrator\components\com_templates\src\Model\StyleModel.php on line 399
PHP Warning: Attempt to read property "parent" on array in \administrator\components\com_templates\src\Model\StyleModel.php on line 400
PHP Warning: Attempt to read property "parent" on array in \administrator\components\com_templates\src\Model\StyleModel.php on line 400
no more warning
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_templates |
The warning here comes from mixed data type of $data parameter:
For the time being, to be safe, you should update code to handle the case $data is an array (see the code from line 415 to 417 to get an idea). Later, we might want to discuss to see if we should update code of loadFormData method to always return object to make it simpler to handle $data
i've done a test with your #45077 in place with current fresh staging
still got ```
[06-Mar-2025 12:24:27 UTC] PHP Warning: Undefined property: stdClass::$parent in C:\laragon\www\530\administrator\components\com_templates\src\Model\StyleModel.php on line 344
[06-Mar-2025 12:24:27 UTC] PHP Warning: Undefined property: stdClass::$parent in C:\laragon\www\530\administrator\components\com_templates\src\Model\StyleModel.php on line 345
[06-Mar-2025 12:24:27 UTC] PHP Warning: Undefined property: stdClass::$parent in C:\laragon\www\530\administrator\components\com_templates\src\Model\StyleModel.php on line 345
you don't need to be familiar to the "automatic test" just edit & save atum from backend 😄
you don't need to be familiar to the "automatic test" just edit & save atum from backend 😄
Thanks. I see the reason of the warning. Fixed now, so it would be great if you can take another look :).
sure i'll do it
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-03-07 11:58:20 |
Closed_By | ⇒ | alikon | |
Labels |
Added:
Updates Requested
PR-5.3-dev
|
I have tested this item ✅ successfully on 5c9b378
Tested before applying this patch there are four "PHP Warning" messages from the web server from running the two tests:
After applying this PR with
scripts/patch 53 joomla-cms-45052
there is no "PHP Warning" message anymore and the Cypress tests still run successfulThis comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45052.