? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
3 Jan 2018

Pull Request for Issue # .

Summary of Changes

In Joomla 3, when we don't set value for $default_view property of controller, Joomla will parse class name of controller and use it as default_view (see https://github.com/joomla/joomla-cms/blob/staging/libraries/src/MVC/Controller/BaseController.php#L427 and https://github.com/joomla/joomla-cms/blob/staging/libraries/src/MVC/Controller/BaseController.php#L767)

In Joomla 4, we use namespace for controller class, so the method getName() doesn't return name of component anymore, thus we had to set value manually for $default_value property of every DisplayController

This PR modify code a bit, set default_view property for controller base on component name, and with this small change, we don't have set default_view property anymore (in case default view is the same with component name) like in Joomla 3.

Testing Instructions

  1. Install Joomla 4.

  2. Apply patch

  3. As the change is the same, you only need to test com_banners. Access to Components -> Banners -> Banners and confirm that it is still working as before.

avatar joomdonation joomdonation - open - 3 Jan 2018
avatar joomdonation joomdonation - change - 3 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jan 2018
Category Administration com_associations com_banners com_categories com_checkin com_fields com_menus com_messages com_modules com_newsfeeds com_plugins com_tags com_users Libraries
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 3 Jan 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Jan 2018

I have tested this item successfully on b880794

Test: Create a new banner, un/pin it.


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

avatar joomdonation
joomdonation - comment - 3 Jan 2018

Thanks for testing. Actually, this only related to banners list, so if you access to banners list and see it is loading OK, then the test is success, no need for add/pin/un pin banners

avatar joomdonation joomdonation - change - 6 Jan 2018
Labels Added: ?
avatar Quy Quy - test_item - 6 Jan 2018 - Tested successfully
avatar Quy
Quy - comment - 6 Jan 2018

I have tested this item successfully on 5a564d2


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

avatar Anu1601CS
Anu1601CS - comment - 29 Jan 2018

I have tested this item successfully on 5a564d2


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

avatar Anu1601CS Anu1601CS - test_item - 29 Jan 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 29 Jan 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Jan 2018

Ready to Commit after two successful tests.

avatar zero-24
zero-24 - comment - 29 Jan 2018

Just to be sure, what happens when you are going to set that value anyway in a 4.0 component maybe with a different name than the component name? Would the new line not override that value set by the component or I'm missing something here?

avatar joomdonation
joomdonation - comment - 29 Jan 2018

The component can set that the default view which it wants to use via default_view property of the DisplayController (the value defined in default_view property won't be overridden)

avatar zero-24
zero-24 - comment - 29 Jan 2018

ok thanks for confirming. ?

avatar laoneo laoneo - change - 3 Apr 2018
Labels Added: ?
avatar laoneo
laoneo - comment - 3 Apr 2018

I have tested this item ? unsuccessfully on e860297

Tested it with com_contact and when I want to open the back end view, it gives me the following error:
500 Layout default not found.


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

avatar laoneo laoneo - test_item - 3 Apr 2018 - Tested unsuccessfully
avatar joomdonation joomdonation - change - 23 May 2018
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2018-05-23 11:09:54
Closed_By joomdonation
avatar joomdonation joomdonation - close - 23 May 2018
avatar laoneo
laoneo - comment - 23 May 2018

Why did you close this one? Would be nice to get rid of the default views? Just revert the changes @wilsonge mentioned and I will test it again.

avatar joomdonation
joomdonation - comment - 23 May 2018

There have been so many changes in 4.0 repo and I haven't had a chance to look at it again yet. I will look at it when again when I have time and address this issue later.

Add a Comment

Login with GitHub to post a comment