? Success

User tests: Successful: Unsuccessful:

avatar alexvanniel
alexvanniel
21 Sep 2015

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.

avatar alexvanniel alexvanniel - open - 21 Sep 2015
avatar alexvanniel alexvanniel - change - 21 Sep 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Sep 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 23 Sep 2015
Category Layout
avatar zero-24
zero-24 - comment - 23 Sep 2015

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.

avatar alexvanniel
alexvanniel - comment - 23 Sep 2015

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..

avatar alexvanniel
alexvanniel - comment - 23 Sep 2015

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.

avatar Bakual
Bakual - comment - 23 Sep 2015

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 :smile:

Closing as it is intended behavior and the issue can be solved by excluding speciifc fieldsets from being rendered.

avatar Bakual Bakual - change - 23 Sep 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-09-23 16:02:33
Closed_By Bakual
avatar Bakual Bakual - close - 23 Sep 2015
avatar Bakual Bakual - close - 23 Sep 2015
avatar alexvanniel alexvanniel - head_ref_deleted - 24 Sep 2015
avatar alexvanniel
alexvanniel - comment - 24 Sep 2015

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?

avatar Bakual
Bakual - comment - 24 Sep 2015

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.

Add a Comment

Login with GitHub to post a comment