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.
The extension should work as J4.
Error displayed.
Not required
Labels |
Added:
?
|
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.
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/ :(
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.
Thanks.
Approximately when will be the changes backported to 3.10 from 4.0? How many items are still pending before it?
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)
Status | New | ⇒ | Discussion |
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)
The issue iis resolved from my side.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-20 07:50:35 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2019-03-20 07:50:35 | ⇒ | 2019-03-20 07:50:36 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/23461
closed as stated above, thanks for Report @Ninja-007
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.