? ? Failure

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
18 May 2016

When we have multiple layouts (menu item types) for the same component view, we more or less copy the whole manifest and just add or remove a few parameters from it. The rest is duplicated code.
This can be seen for example when looking at the manifests for the com_content category view and its two layouts (blog and list/default).
When we add a new feature to the view itself, we have to maintain the parameters in both layout manifests.

Summary of Changes

This PR makes use of the existing (probably not very well known) view and component manifest feature. Instead of duplicating the parameters in each layout manifest, we now can just specify to include the view and/or component manifest file and put the shared parameters into those manifests.
With this PR Joomla will now first load the layout manifest file (eg the default.xml one) and if it specifies to load one of the "parent" files it will load the view and/or the component one (metadata.xml).

When parameters are specified in multiple files, then the layout file takes precedence over the view file over the component file.
Also parameters specified in the "parent" files will appear after the parameters defined in the layout file.

This PR changes the menu item model to load those option files and moves the shared parameters from the com_content category view to the view manfiest file so we have a good test case ?

Testing Instructions

  • Check the parameters in the category view of com_content (category list and category blog) and verify that all are still there after applying the PR
  • Check the functionality of the parameters, there should be no change at all.

Side Effects

When working on this PR I detected a few inconsistencies between the two layouts:

  • The blog layout has an additional option for the parameters in the "Options" tab called "Use Article Settings". That option was missing in the list layout. It's now available in both layouts.
  • The blog layout has two additional parameters in the "Options" tab called Position of Article Info and Show Tags. Those are used in the blog layout itself (and not in the list layout), however in the single article view they exist as well. We could move them to the view file as well but I left it for now since it is a good showcase for how it will work ?
avatar Bakual Bakual - open - 18 May 2016
avatar Bakual Bakual - change - 18 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 May 2016
Labels Added: ?
avatar Bakual Bakual - change - 18 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 18 May 2016
Category Administration
avatar memonica
memonica - comment - 28 May 2016

I succefully tested. #PBFIT


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

avatar Bakual Bakual - change - 6 Jul 2016
The description was changed
avatar izharaazmi
izharaazmi - comment - 20 Oct 2016

What if we want to inherit all parameters but one from the parent xml? Is there anything possible than again doing it the old way?

avatar Bakual
Bakual - comment - 20 Oct 2016

I doubt this can be done easy. It would need at lot more fiddling with JForm than what is currently done.
It for sure is not in the scope of this PR. If accepted, the feature may be expanded afterwards in separate PRs.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jan 2017

@Bakual is this still for testing?

avatar Bakual
Bakual - comment - 8 Jan 2017

Sure

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jan 2017

After "Apply Patch" got "Error: The file marked for modification does not exist: components/com_content/views/category/metadata.xml

avatar Bakual
Bakual - comment - 8 Jan 2017

Looks like I have to resolve some conflicts first. I'll try to do that tomorrow and will ping you.

avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2017
Category Administration Administration com_menus Front End com_content
avatar Bakual
Bakual - comment - 8 Jan 2017

@franz-wohlkoenig Conflicts are solved, it should work again.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Jan 2017

@Bakual Conflicts are solved.

Is in menue category list and category blog only tab Category or from tab Details to tab Module Assignment to test?

avatar Bakual
Bakual - comment - 9 Jan 2017

You need to check all the tabs between and including "Details" and "Integration".
The "Link Type" and the ones after that one are coming from a different source haven't changed.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jan 2017

I have tested this item successfully on 786d890

Category List

  • Options: Show Associations shows now Use Global (Hide)
  • Use Article Settings not shown
  • Page Subheading before & after Patch not shown

Category Blog & List

Layouts: Partial different order inside Tabs (i.E. # Articles to List is now on top of second row)

As Points above are with and without Patch or Side Effects i chose " Tested sucecessfully".


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 10 Jan 2017 - Tested successfully
avatar Bakual
Bakual - comment - 10 Jan 2017

The ordering can change when an option is only available in one layout. So that would be expected.
Your results look as expected I'd say.

avatar brianteeman
brianteeman - comment - 20 Aug 2017

Can you look at resolving the conflicts so that this can be tested please.

avatar Bakual
Bakual - comment - 20 Aug 2017

Rebased and fixed conflicts.

avatar Bakual
Bakual - comment - 8 Jan 2018

I'm closing this PR because there seems to be little interest and resolving the conflicts is to risky by now.
If the interest arises for some reason again, it is easier to just rebuild the PR.

avatar Bakual Bakual - change - 8 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-08 14:47:12
Closed_By Bakual
avatar Bakual Bakual - close - 8 Jan 2018

Add a Comment

Login with GitHub to post a comment