-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[com_fields] Change extension variable to context for custom field groups #13175
Conversation
Some background to explain why I chose "extension" instead of "context" for the groups:
So imho we should change all "context" to "extension" but Allon disagrees with me here 😄 |
@@ -197,7 +204,7 @@ protected function getSortFields() | |||
'a.title' => JText::_('JGLOBAL_TITLE'), | |||
'a.access' => JText::_('JGRID_HEADING_ACCESS'), | |||
'language' => JText::_('JGRID_HEADING_LANGUAGE'), | |||
'a.extension' => JText::_('JGRID_HEADING_EXTENSION'), | |||
'a.context' => JText::_('JGRID_HEADING_context'), |
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.
JGRID_HEADING_context
Should be all uppercase here.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
defined('_JEXEC') or die; | ||
|
||
$app = JFactory::getApplication(); | ||
$component = $app->getUserStateFromRequest('com_fields.groups.extension', 'extension', '', 'CMD'); | ||
$context = $app->getUserStateFromRequest('com_fields.groups.context', 'context', '', 'CMD'); | ||
$component = ''; |
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.
$component isn't populated here and thus the ACL check will break.
Best is probably to move the explode part out of the if clause to the line just before the ACL check.
I have tested this item ✅ successfully on 8a7f5b0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13175. |
I have tested this item ✅ successfully on 8a7f5b0 Amazing progress! This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13175. |
RTC based on 2 successful tests This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13175. |
Thanks to the testers! |
* MSSQL - update sql for Custom fields (#11833) MSSQL - update sql for Custom fields (#11833) * MSSQL - update sql for Custom fields (#11833) MSSQL - update sql for Custom fields (#11833) * MSSQL - install sql for Custom fields (#11833) MSSQL - install sql for Custom fields (#11833) * minor cs + defaul values * move hits field on a new line move hits field on a new line * removed version, hits fields removed (version, hits) fields #12674 * removed (version,hits) fields removed (version,hits) fields #12674 * mssql com_fields#13091 Fixing sql fields #13091 * mssql com_fields#13091 mssql com_fields#13091 * [com_fields] No need for an alias in fields groups. #13115 [com_fields] No need for an alias in fields groups. #13115 * [com_fields] No need for an alias in fields groups. #13115 [com_fields] No need for an alias in fields groups. #13115 * missed comma missed comma * missed comma missed comma * update for #13175 from extension to context * update for #13175 from extension to context * update for #13246 update for #13246 * updated for #13246 updated for #13246 * added the missed DEFAULT added the missed DEFAULT * added space before ( added space before ( * added space before ( added space before (
Summary of Changes
The new field groups (#13019) are created globally per component. It means when a component has more than one context, it is not possible to create groups per context. This pr solves that and allows to create groups per context of fields. A field belongs to a context and with this pr the group as well.
It fixes also an issue where a second asset per group is created when a permission has changed.
Testing Instructions
After a fresh installation, create groups, assign fields to them. All should work as before.
A fresh installation is needed as the database schema has changed..