Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/com_content/src/Controller/ArticleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,13 @@ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'a_id')
$append .= '&' . $urlVar . '=' . $recordId;
}

$itemId = $this->input->getInt('Itemid');
$return = $this->getReturnPage();
$catId = $this->input->getInt('catid');
$itemId = $this->input->getInt('Itemid');

if (\in_array($this->getTask(), ['save2copy', 'apply'], true) && $this->input->exists('return_itemid')) {
$itemId = $this->input->getInt('return_itemid');
}

if ($itemId) {
$append .= '&Itemid=' . $itemId;
Expand Down
5 changes: 4 additions & 1 deletion components/com_content/tmpl/form/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
Expand All @@ -34,6 +35,8 @@
if (!$params->exists('show_publishing_options')) {
$params->set('show_urls_images_frontend', '0');
}

$menu = Factory::getApplication()->getMenu()->getActive();
?>
<div class="edit item-page">
<?php if ($params->get('show_page_heading')) : ?>
Expand All @@ -44,7 +47,7 @@
</div>
<?php endif; ?>

<form action="<?php echo Route::_('index.php'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<form action="<?php echo Route::_('index.php') . ($menu ? "?return_itemid={$menu->id}" : ''); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
<fieldset>
<?php echo HTMLHelper::_('uitab.startTabSet', $this->tab_name, ['active' => 'editor', 'recall' => true, 'breakpoint' => 768]); ?>

Expand Down