joomla-cms/libraries/src/Installer/Adapter/ComponentAdapter.php
Lines 659 to 663 in f29dfba
The component install adapter enforces a requirement that all components have an administration section, effectively mandating that all components must have an administrative backend, which is not always true. Just look at core's com_wrapper as an example.
As this is just an arbitrary check or decision made in the past and does not have an actual practical requirement, we should relax this check and remove the requirement for an <administration>
tag in component XML manifests.
If it is decided that there is an actual requirement for this to be in place, then we need to fix how com_wrapper is installed in the core package because using the install API there is no way to install a component in the way that particular one is.
Labels |
Added:
?
|
Category | ⇒ | Administration |
Status | New | ⇒ | Discussion |
It's not mandated necessarily as ultimately Installer::copyManifest()
lets you specify which application area to store it in, but internally it all defaults to the admin app unless explicitly specified (falling back to the extension_root
path, which for components is the admin app, if in that step an application isn't registered for the given ID).
Well as far as I can tell for components we never use this parameter. So to remove the admin check we need to make that work I guess.
Well, it's a little more complex than that. In ComponentAdapter::setupInstallPaths()
we probably need to make it not use the admin path as the extension root if we don't intend on having an administration section too. So it probably means an internal tracking flag while processing that extension (luckily the adapters shouldn't be singleton anymore so we don't have to worry about state bleedover in the case of packages) so at least those two areas are able to act differently based on whether a component has an admin section. We also would need to account for it on the uninstall path.
Labels |
Added:
J4 Issue
?
|
The component specific service provider is now also loaded from the administrator section. If we agree to have site only components, then we need tho break out the service provider loader too. Honestly I see no use case to have a 3rd party component without any administration part.
Honestly I see no use case to have a 3rd party component without any administration part.
https://github.com/joomla-extensions/install-from-web-server is a component that is really only a frontend user interface and has a couple of config values, there's nothing to administrate in the site's backend there. And, as demonstrated by core, there are at least two components that are entirely frontend integrations with no backend.
So while it is indeed a rather rare use case, it is a legitimate one. I've honestly got no issue if we decide "nope, all components have to have an admin component", but then the core package and our exceptional components should be updated to reflect that requirement.
Even when it has only a config.xml file, then there is already an administration part. I'm ok too with the requirement to have an admin part for a component.
Per discussion this has become a hard requirement. RFC complete.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-09-09 16:39:25 |
Closed_By | ⇒ | mbabker |
Is there a mandate on where the components XML file get's placed (because by default it goes into the components admin area right?)