User tests: Successful: Unsuccessful:
Pull Request for Issue # .
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.
Install Joomla 4.
Apply patch
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.
Status | New | ⇒ | Pending |
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 |
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
Labels |
Added:
?
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
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?
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)
ok thanks for confirming.
Labels |
Added:
?
|
I have tested this item
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.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-23 11:09:54 |
Closed_By | ⇒ | joomdonation |
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.
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.