User tests: Successful: Unsuccessful:
Pull Request for Issue #18046 .
Added check to JAdminMenuCSS for disabled or not installed components.
Disable com_fields, and see the menu. Links to fields components are present, leading to 404 page.
Apply this patch, and see the menu again.
Category | ⇒ | Modules Administration |
Status | New | ⇒ | Pending |
Title |
|
@izharaazmi Please test this if you have a moment.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-30 14:44:26 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
The problem with this code is that it increases drastically the queries.
Any better way? May be by specifically targeting com_fields ?
@infograf768 What do you mean?
@izharaazmi see #18264
I guess we could have done
// Exclude item if com_fields component is not installed or disabled
if ($item->element == 'com_fields' && (!JComponentHelper::isInstalled($item->element) || !JComponentHelper::isEnabled($item->element)))
{
continue;
}
Your suggestion only checks for com_fields, however the current code checks for all components and excludes a menu item if the related component is disabled/not installed.
@izharaazmi
I tested disabling some components like com_associations, com_banners, etc., and it works fine with that code.
I suggest you test yourself.
com_fields is a specific case.
Ok, I'll test it
Okay. I tested it. The checks for items under component container are done internally so they are not needed, fine. For core (protected) components they cannot be disabled from UI, fine.
If we do have any other situation with any components we need this test for them. One such is com_fields
. Since a custom menu can have any components link anywhere they will need this tests I think.
@infograf768 I think we must work to minimise the duplicate queries but restricting to com_fields does not seem right. What do you suggest?
@izharaazmi
I suggest we discuss on #18264.
See my comment there #18264 (comment)
as I think that we may not really need to check if a comp is installed.
I have tested this item✅ successfully on 0e0bdbf
Thanks n3t, works great!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18134.