Skip to content
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

Fix custom fields without a fieldgroup not being displayed #16705

Merged
merged 3 commits into from
Jun 15, 2017

Conversation

continga
Copy link

@continga continga commented Jun 15, 2017

Commit 193e39c introduced the usage of FieldsModelGroups::getItems() when getting the fieldgroups (and hence their fieldset in the backend editing layout) for the fields.

Unfortunately, that commit also introduced a bug, by which custom fields without a field group won't get displayed anymore. This PR fixes this issue.

This should get into the 3.7.3 release, as else the functionality of custom fields is broken.

@laoneo
Copy link
Member

laoneo commented Jun 15, 2017

I have tested this item ✅ successfully on 147cc42


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16705.

@@ -408,8 +408,17 @@ function categoryHasChanged(element) {
$model = JModelLegacy::getInstance('Groups', 'FieldsModel', array('ignore_request' => true));
$model->setState('filter.context', $context);

// $model->getItems() would only return existant groups, but we also
// have the 'default' group with id 0 with isn't existant in the database,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to which is not in the database.

@@ -408,8 +408,17 @@ function categoryHasChanged(element) {
$model = JModelLegacy::getInstance('Groups', 'FieldsModel', array('ignore_request' => true));
$model->setState('filter.context', $context);

// $model->getItems() would only return existant groups, but we also
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to existing.

@Quy
Copy link
Contributor

Quy commented Jun 15, 2017

I have tested this item ✅ successfully on 1bf2794


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16705.

1 similar comment
@laoneo
Copy link
Member

laoneo commented Jun 15, 2017

I have tested this item ✅ successfully on 1bf2794


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16705.

@zero-24 zero-24 added this to the Joomla 3.7.3 milestone Jun 15, 2017
@rdeutz rdeutz merged commit 250fc2a into joomla:staging Jun 15, 2017
@continga continga deleted the fix-subfield-groups branch June 15, 2017 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants