Bug #87570

Path to requirejs-loader.js not correct

Added by Claudia Nölker about 2 months ago. Updated 23 days ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Frontend
Start date:
2019-01-29
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Hello,
after updating to 8.7.24, the Frontend-Editing does not work anymore because the path to the requirejs-loader.js is wrong.
HTML extract:
<script src="typo3/sysext/core/Resources/Public/JavaScript/Contrib/require.js?1548170755" type="text/javascript"></script>
<script src="*/usr/www/users/XXXXX*/typo3/sysext/core/Resources/Public/JavaScript/requirejs-loader.js" type="text/javascript"></script>
<script src="typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery/jquery-3.2.1.min.js?1548170755" type="text/javascript"></script>

The XXXXX is only to mask the customers name.

I tried to correct the path in the file PageRenderer.php . Afterwards, the file is included correctly, but I get warnings in the backend:
Core: Error handler (FE): PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'TYPO3\CMS\Core\Controller\RequireJsController' does not have a method 'retrievePath' in /usr/www/users/XXXXX/typo3_src-8.7.24/typo3/sysext/core/Classes/Http/Dispatcher.php line 41

Please fix this.

Claudia

01.png View (498 KB) David Bascom, 2019-02-15 21:58

frontend.jpg View (123 KB) Martin Weymayer, 2019-02-28 08:02

Associated revisions

Revision 3d556b40 (diff)
Added by Oliver Hader 23 days ago

[BUGFIX] Properly use requirejs-loader.js in frontend context

The eID handler in frontend context had a wrong method name. Besides
that generating according <script src="requirejs-loader.js"> tag had
flaws in path resolving.

Resolves: #87570
Releases: master, 9.5, 8.7
Change-Id: Ic5a3b824e8ae5aa776fd0e6502682aba6ae282b8
Reviewed-on: https://review.typo3.org/c/59810
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Jürgen Venne <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Markus Klein <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Frank Naegler <>
Reviewed-by: Jürgen Venne <>
Reviewed-by: Anja Leichsenring <>

Revision 584e785b (diff)
Added by Oliver Hader 23 days ago

[BUGFIX] Properly use requirejs-loader.js in frontend context

The eID handler in frontend context had a wrong method name. Besides
that generating according <script src="requirejs-loader.js"> tag had
flaws in path resolving.

Resolves: #87570
Releases: master, 9.5, 8.7
Change-Id: Ic5a3b824e8ae5aa776fd0e6502682aba6ae282b8
Reviewed-on: https://review.typo3.org/c/59826
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

Revision b83979a4 (diff)
Added by Oliver Hader 23 days ago

[BUGFIX] Properly use requirejs-loader.js in frontend context

The eID handler in frontend context had a wrong method name. Besides
that generating according <script src="requirejs-loader.js"> tag had
flaws in path resolving.

Resolves: #87570
Releases: master, 9.5, 8.7
Change-Id: Ic5a3b824e8ae5aa776fd0e6502682aba6ae282b8
Reviewed-on: https://review.typo3.org/c/59827
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Claudia Nölker about 2 months ago

The stars in the URL are only because I wanted to highlight that part. URL is:

<script src="/usr/www/users/XXXXX/typo3/sysext/core/Resources/Public/JavaScript/requirejs-loader.js" type="text/javascript"></script>

#2 Updated by David Bascom about 1 month ago

  • File 01.png View added
  • TYPO3 Version changed from 8 to 9

Same problem here. Using Typo3 9.5.4 and frontend_editing 1.4.6.
Tested with a fresh installation and only the official Introduction Package installed.

The script-tag gets inserted with an absolute server path of the file.
Correcting it manually makes a call to:

/index.php?eID=requirejs&name=%2Ftypo3%2Fsysext%2Fbackend%2FResources%2FPublic%2FJavaScript%2Fbackend.js

which results in the error attached.
(1/1) ReflectionException
Method TYPO3\CMS\Core\Controller\RequireJsController::retrievePath() does not exist

#3 Updated by Oliver Hader 26 days ago

  • Target version set to Candidate for patchlevel
  • Is Regression set to Yes

#4 Updated by Oliver Hader 26 days ago

  • Status changed from New to Accepted

#5 Updated by Gerrit Code Review 26 days ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59810

#6 Updated by Oliver Hader 26 days ago

  • Category set to Frontend

Please test referenced change on review.typo3.org and report back whether that solves the problems you mentioned. Thanks in advance!

#7 Updated by Martin Weymayer 25 days ago

patch seems not working for 9.5.4 in combination with frontend editing

#8 Updated by Oliver Hader 25 days ago

Martin Weymayer wrote:

patch seems not working for 9.5.4 in combination with frontend editing

Cleared all caches? Which error messages are shown?

#9 Updated by Martin Weymayer 25 days ago

yes, cleared all caches. spinning image is shown and does not dissapear. following error in browser console:
ReferenceError: TYPO3 is not defined[Weitere Informationen] Icons.js:13:1794
Error: Load timeout for modules: /typo3/sysext/backend/Resources/Public/JavaScript/backend.js
http://requirejs.org/docs/errors.html#timeout

#10 Updated by Markus Klein 24 days ago

@martin please vote and comment in the code review https://review.typo3.org/c/Packages/TYPO3.CMS/+/59810
Reviewers will mostly not see your comments here. Thanks.

(I posted a -1 on behalf of you for the time being)

#11 Updated by Gerrit Code Review 24 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59810

#12 Updated by Oliver Hader 24 days ago

Frontend Editing is using some absolute "module" (=path) which was not covered by the new require.js loader:
https://github.com/FriendsOfTYPO3/frontend_editing/blob/master/Resources/Public/JavaScript/GUI.js#L18

Please test again, in my scenario at least frontend editing JavaScript now are loading in frontend context.

#13 Updated by Gerrit Code Review 23 days ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59826

#14 Updated by Gerrit Code Review 23 days ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59827

#15 Updated by Oliver Hader 23 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF