-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[/cms/component/helper] Exclude components in discover state from list #12469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changing load order and adding a comment. Proposed by @piotr-cz
Simple CS for travis
Exclude components in discover state from list
[/cms/component/helper] Exclude components in discover state from list
|
The pull request you've linked (and commented on) is completely unrelated to this proposed change. Please describe why you think this change is necessary. |
|
yes, and add test instructions too (the test instructions header is there when you create a pull request for a reason ...) |
|
@mbabker @andrepereiradasilva description update with test instructions |
|
Can you ever have an extension in the database that does not have a status of 0 (I could be completely missing the point and you description has been lost in translation) |
|
When you discover extensions, all found extensions are loaded into the database with |
|
Yes @mbabker , extension with |
|
As I said the description and test instructions were incomplete and misleading. There is NO mention of doing a discover at all. Only to create the files |
|
@brianteeman description update |
|
Alright, it looks like this change only affects on discovered components. It really should also prevent disabled components ( See the linked issue from above. |
Prevent disabled extensions "enabled = 0"
|
Yes @mahagr , adding request condition for prevent disabled extensions. |
|
I'd only add it to the |
|
ok @mbabker |
|
I agree that it should be only on BTW, this pull request will change how component helper works and may have some visible side effects on peoples sites. This is because of both After running some tests with J!3.6.3, it looks like disabling extension makes it to stop to work from frontend and hidden in backend, though in backed you can still access the extension by typing the option manually (a bug?). On the other hand discovered component seems to be fully working as long as it has been enabled (another bug?). I need to test the same with the patch applied; I'll find some time for that. |
|
I just tested all the combinations with the patch (disabled, discovered | enabled, discovered, disabled, installed | enabled, installed) and it looks like that it doesn't change much in the admin -- except that discovered/enabled component is shown in the admin menu, but you cannot access it. You cannot access disabled component either. This is an improvement over discovered or disabled component being fully accessible in admin, but it would be nice to have another patch hiding the admin menu items in that case (I've seen sites with discovered but enabled components before -- not sure how you end up getting them, maybe failed install?) |
mahagr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix looks good to me.
|
I have tested this item ✅ successfully on 4d3775f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12469. |
|
I have tested this item ✅ successfully on 4d3775f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12469. |
|
RTC after two successful tests. |
|
Merge conflict needs to be addressed. |
|
@vinespie can you please resolve conflicting Files? |
|
Replaced by #21010 with merge conflicts resolved. |
Summary of Changes
Exclude components in discover state from list.
Method "getComponents" in class JComponentHelper return all components, even those who are in the state to discover. Must add state in queries.
Test instructions
<?php defined('_JEXEC') or die; die('Router call'); ?><?xml version="1.0" encoding="utf-8"?> <extension type="component" version="3.1" method="upgrade"> <name>com_test</name> <files folder="site"> <filename>router.php</filename> </files> </extension>Related pull request
#8986 Parse preprocess rules from component routers : router of all components are loaded, even those that are not installed.