User tests: Successful: Unsuccessful:
Check if com_fields is enabled
Disable the com_fields component via Extensions=> Manage=>Manage
Edit an article and click on the Field icon in the editor toolbar.
=> 404
Patch and test again: the button will not display
Category | ⇒ | Front End Plugins |
Status | New | ⇒ | Pending |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Thanks @infograf768 for patching this. One note here tho,
I would like us to change the API of the buttons by adding 2 more vars in the object button:
realName
string, which would be the real name of the button (eg pig_xtd_articles) now the name is some class for the icomoon icon
component
string or null which would refer to the component associated with the button
Then adding just one check, similar to what you've done here, in Editor getButtons() we have this functionality for every component, without hardcoding anything and without even loading the button if the component is disabled.
I guess what I'm proposing should go to J4, but even J3 should be happy as we're adding functionality without breaking any existing. @mbabker @wilsonge what do you think?
Looks like a nice idea.
Not all xtd buttons have to go into a component I guess? And also the other way you could definitely be dependent on multiple components... The plugin should bail early on it's component deps rather than us trying to force something through the system.
we could maybe merge this one until another possible solution is decided.
Not all xtd buttons have to go into a component I guess
Sure, thats the null || string
option in the variable, if null no component dependency, the code curries on normally..
The difference between checking inside the plugin or in the editor is mainly for some possible performance gain (the system will not load/execute any xtd's when the component that they're depending is disabled). Anyways the gain should be marginal (unless someone has 1000 xtd buttons)...
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-19 15:09:47 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
I have tested this item✅ successfully on e9fdd4d
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18345.