J4 Issue ? ?
avatar mbabker
mbabker
5 Oct 2017

// Make sure that we have an admin element
if (!$this->getManifest()->administration)
{
throw new \RuntimeException(\JText::_('JLIB_INSTALLER_ERROR_COMP_INSTALL_ADMIN_ELEMENT'));
}

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.

avatar mbabker mbabker - open - 5 Oct 2017
avatar joomla-cms-bot joomla-cms-bot - change - 5 Oct 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Oct 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Oct 2017
Category Administration
avatar wilsonge
wilsonge - comment - 11 Oct 2017

Is there a mandate on where the components XML file get's placed (because by default it goes into the components admin area right?)

avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Oct 2017
Status New Discussion
avatar mbabker
mbabker - comment - 11 Oct 2017

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).

avatar wilsonge
wilsonge - comment - 11 Oct 2017

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.

if (!$this->parent->copyManifest())

avatar mbabker
mbabker - comment - 11 Oct 2017

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.

avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2018
Labels Added: J4 Issue ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Mar 2018
avatar laoneo
laoneo - comment - 21 Aug 2018

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.

avatar mbabker
mbabker - comment - 21 Aug 2018

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.

avatar laoneo
laoneo - comment - 21 Aug 2018

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.

avatar mbabker
mbabker - comment - 9 Sep 2018

Per discussion this has become a hard requirement. RFC complete.

avatar mbabker mbabker - change - 9 Sep 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-09-09 16:39:25
Closed_By mbabker
avatar mbabker mbabker - close - 9 Sep 2018

Add a Comment

Login with GitHub to post a comment