Updates Requested PR-4.2-dev


User tests: Successful: Unsuccessful:

avatar pe7er
17 May 2022

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

  1. In back-end go to: Content > Field Groups
  2. Create a Field group and Save & Close
  3. Notice the URL:
  4. Unpublish the Group
  5. Notice the new URL and the closed Menu:
    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:

  1. Content > Field Groups /administrator/index.php?option=com_fields&view=groups&context=com_content.article
  2. Content > Fields /administrator/index.php?option=com_fields&view=fields&context=com_content.article
  3. Users > Field Groups /administrator/index.php?option=com_fields&view=groups&context=com_users.user
  4. Users > Fields /administrator/index.php?option=com_fields&view=fields&context=com_users.user

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.

avatar pe7er pe7er - open - 17 May 2022
avatar pe7er pe7er - change - 17 May 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 May 2022
Category Libraries
avatar brianteeman
brianteeman - comment - 17 May 2022

also see #34067

avatar pe7er pe7er - change - 17 May 2022
Labels Added: PR-4.1-dev
avatar joomdonation
joomdonation - comment - 25 Jun 2022

@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 getRedirectToListAppend method to the two controllers with the below code should solve the issue:

protected function getRedirectToListAppend()
	$context = $this->input->getString('context');

	if ($context)
		return '&context=' . $context;
avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull requests has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 28 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 28 Jun 2022
Labels Added: Updates Requested psr12
avatar joomdonation
joomdonation - comment - 24 Feb 2023

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 !

avatar joomdonation joomdonation - close - 24 Feb 2023
avatar joomdonation joomdonation - change - 24 Feb 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-02-24 10:40:48
Closed_By joomdonation
Labels Added: PR-4.2-dev
Removed: PR-4.1-dev psr12

Add a Comment

Login with GitHub to post a comment