kitodo / kitodo-publication

Kitodo.Publication
GNU General Public License v3.0
13 stars 13 forks source link

Backend Layout has conflict with TYPO3 7.6 #72

Closed albig closed 6 years ago

albig commented 6 years ago

The backend layout uses the be:container Fluid viewhelper: Resources/Private/Layout/DefaultBE.html and Resources/Private/Layout/DocumentBE.html

This has two deprecated parameters (loadPrototype and loadScriptaculous). The first is set in Kitodo.Publication to false which disables loading prototype.js in the backend. The second does the same for scriptaculous.

Both parameters don't exists in TYPO3 7.6 anymore. An exception is thrown. See Viewhelper for 6.2 and for 7.6.

Solution 1:

  1. remove "loadScriptaculous = false" as it is the default in TYPO3 6.2
  2. remove "loadPrototype = false" and set jQuery code to noConflict

prototype.js and jQuery have conflicts if you doesn't use the noConflict mode. See possible solution in answer at https://stackoverflow.com/questions/980697/element-dispatchevent-is-not-a-function-js-error-caught-in-firebug-of-ff3-0

Solution 2: As of TYPO3 7.6 jQuery is available in the backend. So we could change the be:container and load the TYPO3 jQuery and not the Kitodo.Publication one. The parameter loadJQuery has to be set to true.

We could use a typoscript condition to load the proper backend layouts.

claussni commented 6 years ago

I'm in favor of removing things, especially if values are not different from the system default.

albig commented 6 years ago

It seems to be not that simple as expected. We can make the backend Manager module available with removing loadScriptaculous and loadPrototype. But there are huge javascript errors in the debug console by request.js.

So we should understand first, how javascript should work today in TYPO3 backend modules: https://typo3.com/blog/how-to-use-javascript-in-typo3s-backend/

Further investigation is necessary.

claussni commented 6 years ago

Fixed with https://github.com/kitodo/kitodo-publication/commit/baeca21a49225ceacc9b8a510c2a0a46547c66b7