?
avatar Ninja-007
Ninja-007
6 Jan 2019

Steps to reproduce the issue

I have an extension developed in J4 architecture format. The extension runs fine on J4. Just now I have installed the extension on J3.9.1. But I got following error.

Call stack
--
# | Function | Location
1 | () | JROOT/libraries/src/Component/ComponentHelper.php:367
2 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:101
3 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:159
4 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:196
5 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/index.php:51

After doing some debugging in the ComponentHelper.php, I found that the issue is related with following lines (362).
The path variable is evaluated to /var/www/html/joomla3/administrator/components/com_extensionname/extensionname.php. The extension does not have extensionname.php in the admin folder. It is not required as the extension uses default DisplayController name.

		$path = JPATH_COMPONENT . '/' . $file . '.php';

		// If component is disabled throw error
		if (!static::isEnabled($option) || !file_exists($path))
		{
			throw new MissingComponentException(\JText::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'), 404);
		}

If I remove the condition (!file_exists($path)) then I get blank screen. There are no debug traces.

Expected result

The extension should work as J4.

Actual result

Error displayed.

System information (as much as possible)

Not required

Additional comments

avatar Ninja-007 Ninja-007 - open - 6 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jan 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jan 2019
avatar Ninja-007
Ninja-007 - comment - 6 Jan 2019

As per the post https://developer.joomla.org/news/717-joomla-4-compatibility-layer-in-3-8.html
The backward compatibility layer should be present in 3.9.0.

avatar joomdonation
joomdonation - comment - 6 Jan 2019

The plan was changed because we had to release 3.9.0 with joomla privacy tool suite. The backward compatibility layer will only be available from 3.10.0.

avatar Ninja-007
Ninja-007 - comment - 6 Jan 2019

Thanks.
I have tested the extension in todays nightly build 3.10 dev. The problem is still there. As per this press release https://developer.joomla.org/news/759-joomla-4-is-on-the-horizon-alpha-6.html J3.10 will be released along with J4.
This makes extension development plan difficult to test the backward compatibility on J3.
I did not find any PR -J3.10-dev or any relevant issue on https://issues.joomla.org/ :(

avatar mbabker
mbabker - comment - 6 Jan 2019

If you want an extension that is designed to work with 3.x and 4.x and is backward compatible with 3.x, you need to use 3.x development practices (which should work aside from known and accepted B/C breaks on 4.x). If you want an extension that is designed to work with 3.x and 4.x and is forward compatible with 4.x, you will need to wait until the required work is backported from 4.0 to the 3.10 branch. Until that happens, you cannot build a 4.0 based extension and have it run on 3.x.

avatar Ninja-007
Ninja-007 - comment - 6 Jan 2019

Thanks.
Approximately when will be the changes backported to 3.10 from 4.0? How many items are still pending before it?

avatar wilsonge
wilsonge - comment - 7 Jan 2019

Basically we're not going to make a concentrated effort on it until we hit feature freeze on J4 branch (expected to be spring this year) - and we're already slowing down on most areas. It's going to be very hard to backport things like the service container work in. Also as Michael said largely it's going to be about ensuring the 3.x layer works on j4 rather than vice versa. We're not going to backporting things like the container layer back - but likely will backport the dispatcher layer in all likelihood in a more restricted way (the scope of what we backport is still to be determined)

avatar Ninja-007
Ninja-007 - comment - 8 Jan 2019

Related issue #16768 #23376

avatar Ninja-007
Ninja-007 - comment - 8 Jan 2019

@wilsonge Thanks.

I am not looking for new features which are introduced in J4 to be backported to J3, it will be counter intuitive. The event management (i.e. dispatcher) and router improvements should be sufficient, namespaces are already backported to J3.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Mar 2019
Status New Discussion
avatar wilsonge
wilsonge - comment - 19 Mar 2019

Router nor event dispatcher is going to be backported. You can use Factory::getApplication()->triggerEvent() in J3 for components to call. The plugin changes can't be backported because of how b/c works in the extension I'm afraid (the class inheritance mainly)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Mar 2019

@wilsonge can the Issue be closed?

avatar Ninja-007
Ninja-007 - comment - 20 Mar 2019

The issue iis resolved from my side.

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Mar 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-03-20 07:50:35
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2019
Closed_Date 2019-03-20 07:50:35 2019-03-20 07:50:36
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 20 Mar 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 20 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Mar 2019

closed as stated above, thanks for Report @Ninja-007

Add a Comment

Login with GitHub to post a comment