Load any extension that has an associated changelog file, for example https://extensions.joomla.org/extension/edition/editors/switch-editor-2/
Go to System/Extensions, search for switch editor in extensions list and click on underlined version number to display changelog content.
changelog is displayed
Error message : SyntaxError: Unexpected token '<', "
"... is not valid JSON
In errorlog,
[07-Sep-2023 13:06:09 UTC] PHP Deprecated: Creation of dynamic property Joomla\CMS\Changelog\Changelog::$changelogs is deprecated in D:\laragon6-------------\www\j5beta\libraries\src\Changelog\Changelog.php on line 275
[07-Sep-2023 13:06:09 UTC] PHP Deprecated: Creation of dynamic property Joomla\CMS\Changelog\Changelog::$changelog is deprecated in D:\laragon6-------------\www\j5beta\libraries\src\Changelog\Changelog.php on line 275
[07-Sep-2023 13:06:09 UTC] PHP Deprecated: Creation of dynamic property Joomla\CMS\Changelog\Changelog::$item is deprecated in D:\laragon6-------------\www\j5beta\libraries\src\Changelog\Changelog.php on line 275
PHP 8.2, Joomla 5.0 Beta 1
In Joomla 4, Changelog class extends CMSObject and, in Joomla 5, it's a class on its own.
Labels |
Added:
No Code Attached Yet
|
#[\AllowDynamicProperties] is not a longterm solution
I cannot reproduce it.
I have installed linked extension on Joomla 5 beta1, set error_reaporting to maximum,
But there no error when looking a change log for this extension.
ah, yeah, not 8.2 :)
Will try again later
Labels |
Added:
PHP 8.x
|
If you set error reporting to none, you won't see deprecated lines and changelog display is OK.
Error reporting to maximum adds the deprecated lines at the beginning of $output in administrator\components\com_installer\src\Controller\ManagerController.php, line 176 causing then JSON Error.
The deprecation trigger comes from here
joomla-cms/libraries/src/Changelog/Changelog.php
Lines 271 to 273 in 1e7527b
It not 5.0 specific. But general.
There also an issue that the changelog does not display full list. which is already reaported #37774
I suspect these issue is connected.
Hovewer I have no idea what this startElement
/endElement
are doing here.
Title |
|
Labels |
Added:
bug
|
It not 5.0 specific. But general.
In Joomla 4, Changelog class extends CMSObject which contains #[\AllowDynamicProperties]
Title |
|
You are right
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-07 17:03:07 |
Closed_By | ⇒ | conseilgouz |
I think adding #[\AllowDynamicProperties] in libraries/src/Changelog/Changelog.php should work