Project

General

Profile

Actions

Bug #96374

closed

Wrong include path calculated for RequireJS

Added by Francois Suter almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend JavaScript
Start date:
2021-12-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
RequireJS
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Context: a backend module (extension external_import) loads the 3rd-party library Datatables using:

            $publicResourcesPath = PathUtility::getAbsoluteWebPath(
                    ExtensionManagementUtility::extPath('external_import')
                ) . 'Resources/Public/';
            $pageRenderer = $view->getModuleTemplate()->getPageRenderer();
            $pageRenderer->addRequireJsConfiguration(
                [
                    'paths' => [
                        'datatables' => $publicResourcesPath . 'JavaScript/Contrib/jquery.dataTables'
                    ]
                ]
            );


This worked fine until TYPO3 11.5.3 and breaks with 11.5.4.

The reason is that the path is wrongly calculated as:

https://foo.com/var/www/html/vendor/cobweb/external_import/Resources/Public/JavaScript/Contrib/jquery.dataTables.js?bust=1639666788

instead of:

https://foo.com/typo3conf/ext/external_import/Resources/Public/JavaScript/Contrib/jquery.dataTables.js

Actions

Also available in: Atom PDF