Ensure that Enable Versions is Yes for articles.
Save a number of versions of the same com_content category.
Then when editing the category, click on the Versions button.
Within the modal window select an older version of the category and click on the Restore button.
The previous version should be shown in the category edit form.
Error 404 is returned.
The traceback shows
1 | () | JROOT\libraries\src\Component\ComponentHelper.php:351
2 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\AdministratorApplication.php:143
3 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT\libraries\src\Application\AdministratorApplication.php:186
4 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:294
5 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\administrator\includes\app.php:61
6 | require_once() | JROOT\administrator\index.php:32
Joomla 4.2.5 on Windows 10
Whenever the Restore button is clicked it generates a GET to a URL of the form:
This fails in ComponentHelper
because it takes the option as com_categoriesampextensioncom_content
and can't find a component of that name.
I think that the problem is in administrator\components\com_contenthistory\src\View\History\HtmlView.php::addToolbar
The code
$option = $aliasArray[1] == 'category'
? 'com_categories&extension=' . implode('.', array_slice($aliasArray, 0, count($aliasArray) - 2))
: $aliasArray[0];
sets the $option
to com_categories&extension=com_content
Then the line:
$loadUrl = Route::_('index.php?option=' . $filter->clean($option, 'cmd') . '&task=' . $task . '&' . $token . '=1');
results in
$filter->clean($option, 'cmd')
removing the non-alpha characters from the $option
to leave com_categoriesampextensioncom_content
, which then gets incorporated into the url.
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-22 14:52:21 |
Closed_By | ⇒ | joomdonation |
Bug confirmed