maikschneider / bw_focuspoint_images

With this TYPO3 extension you can create responsive image maps in the backend. This extension ships an image editor that can be used to add areas and information to an image.
5 stars 1 forks source link

9.5 Compatibiliy broken #15

Closed bebeGit closed 7 months ago

bebeGit commented 7 months ago

https://github.com/maikschneider/bw_focuspoint_images/blob/dc9ec10aec0965a30b8750e2edc2e9683b0612de/Resources/Public/JavaScript/FocuspointWizard.js#L13

TYPO3/CMS/Backend/ActionButton/ImmediateAction only available since 10.4 as i am aware

maikschneider commented 7 months ago

Hi @bebeGit, you're right, ImmediateAction is only available for v10+. However I didn't want to maintain an additional JS file, so I added a version check before using it, see FocuspointWizard.js@v3.0.4. The error during import is not nice, but does not crash the rest of the application. Do you encounter great problems?

bebeGit commented 7 months ago

Hey Maik , thanks for replying that fast and especially for clearing things up. But I have to insist. Trying to open the focuspoint editor in the backends content element leads to following error:

Uncaught Error: Script error for "TYPO3/CMS/Backend/ActionButton/ImmediateAction", needed by: TYPO3/CMS/BwFocuspointImages/FocuspointWizard

I didn't try it in TYPO3 > 9 yet but in 9 it works wrapping the immediateAction call with:

require(['TYPO3/CMS/Backend/ActionButton/ImmediateAction'], function (ImmediateAction) {
...
});

while getting rid of calling it in define block.

maikschneider commented 7 months ago

Hey @bebeGit, cool! Didn't think about putting the import into the condition. Have you installed the sources and could create a PR?

maikschneider commented 7 months ago

Fixed in v3.0.5