New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.1] AdminController - Add context if any, to redirect URL #37818
[4.1] AdminController - Add context if any, to redirect URL #37818
Conversation
also see #34067 |
@@ -115,6 +115,17 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu | |||
} | |||
|
|||
$this->view_list = strtolower($r[2]); | |||
|
|||
// Add the context to $this->view_list to use in the redirect URL | |||
if (isset($app->input)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App should always have an input
@pe7er The propose change does not look right to me. For this, you should modify code in Fields and Groups controllers of com_fields instead. Just add protected function getRedirectToListAppend()
{
$context = $this->input->getString('context');
if ($context)
{
return '&context=' . $context;
}
} |
This pull requests has automatically rebased to 4.2-dev. |
This pull requests has been automatically converted to the PSR-12 coding standard. |
Hi @pe7er Look like you are too busy and do not have time to make the suggested change as I commented #37818 (comment) . So I made the PR #39926 to replace this one to have this issue fixed and close this PR. Hope that's fine for you. If you still want to finish this PR, please let me know. I will close mine and re-open yours. Thanks ! |
Pull Request to fix missing context for com_fields when doing actions like publishing or unpublishing Field or Field Group items.
Summary of Changes
In the Custom Field Groups and Custom Fields of Content & Users, the left menu closed after doing an action (like publish or unbublish) on a Custom Field Group Item or Custom Field Item.
Field Groups menu closes when doing actions
/administrator/index.php?option=com_fields&view=groups&context=com_content.article
/administrator/index.php?option=com_fields&view=groups
The Context is not passed through, and the menu has been closed.
The same issue happens in other places with other Custom Fields too.
Testing Instructions
Go to each of the following menu items and publish or unpublish an item:
/administrator/index.php?option=com_fields&view=fields&context=com_content.article
Actual result BEFORE applying this Pull Request
After doing a publish or unpublish action in com_fields, the menu on the left closes because the URL is missing the
&context=[component][view]
Expected result AFTER applying this Pull Request
After doing a publish or unpublish action in com_fields, the menu on the left remains open because the right context
&context=[component][view]
is passed through via the URL.