jweiland-net / sync_crop_areas

git@github.com:jweiland-net/sync-crop-areas.git
Other
0 stars 2 forks source link

[BUG] Synchronizing the crop variants doesn't work anymore #16

Closed PhilippKuhlmay closed 2 years ago

PhilippKuhlmay commented 2 years ago

Hello,

with TYPO3 11.5.5 and EXT:sync_crop_areas 2.1.0 (and 2.0.1) i cannot synchronize the crop variants anymore.

As soon I collapse the image I get the error

VM910 ImageManipulation.js:13 Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at h.update (VM910 ImageManipulation.js:13:8040)
    at HTMLLabelElement.<anonymous> (VM910 ImageManipulation.js:13:6529)
    at HTMLLabelElement.dispatch (jquery.js?bust=1642602253:5430:27)
    at HTMLLabelElement.elemData.handle (jquery.js?bust=1642602253:5234:28)

inside the console. I am not sure if this is related to this extension or a problem inside the core. Without this extension installed, I still get the same error. So this error seems to be inside the core but the problem with the crop variants which aren't synchronizing is still present.

After cropping and saving the content element, the other crop variants are still the same:

Bildschirmfoto 2022-01-21 um 12 45 40

This could be related to https://forge.typo3.org/issues/95259

froemken commented 2 years ago

Hello @PhilippKuhlmay

we are using this extension for nearly all of our projects and I haven't seen this problem. sync_crop_areas does not touch any JavaScript, I use as much TYPO3 API as I can and I don't modify any TYPO3 BE templates. So, IMO I would confirm, that sync_crop_areas is not the problem.

Please tell me: Which TYPO3 extensions you have installed? Can you see, if the ImageManipulation.js was original loaded from typo3/sysext/backend or another directory? The "find" function seems to be jquery. Is there another extension which loads jquery in backend?

I see that your first image has a 16:9 ratio. sync_crop_areas will only synchronize CropVariants of same ratios to all the other CropVariants since version 2.0.0. Please check, if Groß, Mittel, Klein are also allowed to have 16:9 ratio.

Nice greetings

Stefan

PhilippKuhlmay commented 2 years ago

Hello Stefan,

the ImageManipulation.js comes from typo3/sysext/backend.

It is working with sync_crop_areas 2.1.0 in combination with TYPO3 10.4.23, but not with TYPO3 11. I have some extensions like bootstrap_package and container installed. But even without these extensions, it's not working. I can give you a full list of all extensions via Slack or Zoom or somewhere else. I don't want to publish it here in GitHub.

The other cropvariants have the same aspect ratio but it's still not working.

froemken commented 2 years ago

I have contacted you on Slack.

Do you have any further columns in sys_file_reference? Do you work with translations, different images for each translation and/or workspaces?

froemken commented 2 years ago

Hi @PhilippKuhlmay ,

today I have released version 2.2.0 with a lot of improvements. Can you test, if this version works for you?

PhilippKuhlmay commented 2 years ago

With version 2.2.0 it works for me now. Thanks.