FriendsOfTYPO3 / frontend_editing

TYPO3 CMS Frontend Editing
https://friendsoftypo3.github.io/frontend_editing/
102 stars 39 forks source link

Frontend loads twice in frontend_editing module #675

Closed webian closed 1 year ago

webian commented 1 year ago

In the frontend_editing module, the website frontend is always loaded 2 times. If I remember correctly, it was necessary to load it 2 times before version 2.0. Is it still necessary in version > 2?

MattiasNilsson commented 1 year ago

@webian Not really sure in which case you mean? Is it in the iframe of the backend module that is loads twice? Because there is 1 page request and then an AJAX request on top of that.

webian commented 1 year ago

Yes, it is loaded twice in the iframe of the backendmodule. Can you help me to understand the reason of the second AJAX request? Because, debugging, I tried to wrap my head around this but I failed.

MattiasNilsson commented 1 year ago

@webian So basically we fetch the page as it is with the Frontend Editing wrapping and content editables. Then we need to fetch the resources (Javascript etc) so be able to interact with the website.

But there is still only 1 page request being made.

Screenshot 2023-07-31 at 11 06 42

webian commented 1 year ago

That screenshot you posted displays the network filtered by "FrontendEditing" and displays the module request.

Then the module makes a requests of the frontend page. And another request of the frontend page is made with jQuery. o0koiojh

Is it necessary to make 2 requests of the frontend page?