User tests: Successful: Unsuccessful:
The fieldset 'params' needs to specified here, otherwise all fieldsets of the entire form will be rendered here, causing all kinds of unwanted behaviour like displaying the layout for the basic data twice and thus rendering the editor unsable for instance. This looks like a regression to me. Unless I am doing something wrong. However, when specifying JLayoutHelper::render('joomla.edit.params'); I expect to see only the layout for the params fieldset and not the other fieldsets like basic data and metadata.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Layout |
I tried to see if I could reproduce the problem that I came across in my own component with a core component like com_content or com_weblinks but somehow I could not get it to display the same problems I encountered. It appears there have been some changes to the way the params fieldset is displayed. I could not find any documentation or mention on why this was done and what changes to a component needs to be made. Maybe I am missing the point entirely here but when I upgraded to 3.4.4 my component started to show the basic form fields twice for instance. Comparing this code with the old code showed that somehow the params layout is now not filtered with 'params' as argument. So, if anyone can shed some light on this... As said, I may be doing something wrong. I would like to know what that is... if at all..
I did find out that the problems I experienced without this proposed change, would go away when I would remove the "name" attribute from my first fieldset in my form xml. So basically, the layout will display all fieldsets that have a name attribute set in the form xml. Is that supposed to happen that way? I do see that com_contact, com_content and such don't have an attribute name for the first fieldset set.
You can define the ignore_fieldsets
arraykey in the $displayData
and specify which fieldsets should not be rendered by the JLayout. See https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/edit/params.php#L21-L23
I think that is what we do in our core extensions.
The JLayout is meant to show all fieldsets, not only the params one. That's why there is a foreach later one. If we only wanted to show a single fieldset, then that foreach would be useless
Closing as it is intended behavior and the issue can be solved by excluding speciifc fieldsets from being rendered.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-09-23 16:02:33 |
Closed_By | ⇒ | Bakual |
Sorry to comment in this closed pull request but I did notice that ignore_fields is not used even though it is picked up... is this something that is being worked on or has the use of ignore_fields been "forgotten" c.q. omitted?
It's used in https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/edit/fieldset.php (which is called by the params JLayout)
In the params JLayout itself it is indeed useless and the lines could be removed.
Can we have a simple usecase or example with a core or 3Party component?
Also I'm not sure with the B/C handeling here maybe @Bakual can help here?
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7922.