Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Issue tags: +D8Media
Primsi’s picture

Thanks for the patch (adding it to files so that testbot can see it). It would be great if somebody who uses this functionality could test it properly.

chr.fritsch’s picture

One thing was missing in the first patch. We have to clean up the form_state in clearFormValues.

Also i removed class property. There was no need for that

alduya’s picture

The patch in #4 solves the problem for me.

chr.fritsch’s picture

Some additional work

If an Image is dropped into IEF Dropzone and then you are dropping another one before submitting, the second image will be used.

Primsi’s picture

Status: Needs review » Needs work
+++ b/modules/eb_widget/src/Plugin/EntityBrowser/Widget/DropzoneJsEbWidget.php
@@ -184,12 +175,21 @@ class DropzoneJsEbWidget extends WidgetBase {
+      } catch (\Exception $e) {}

Shouldn't we handle this exception?

Apart from that all seems to work normally as far as I could test. Thanks for the work!

chr.fritsch’s picture

I am not sure how to handle it. The method is called twice, so on the second run it will always fail, because image is already moved. I don't know what we should do there

Primsi’s picture

Hm, I was thinking, is this the right approach then? Can we fix this at the source of the problem (if possible) instead of fighting consequences?

chr.fritsch’s picture

Status: Needs work » Needs review
FileSize
2.76 KB

Ok, i try to decouple all the patches.

So in this one i let the stuff for IEF Dropzone out.

Also i removed the try catch and added a check if the file exists.

  • Primsi committed 9899051 on 8.x-1.x authored by chr.fritsch
    Issue #2825429 by chr.fritsch, Primsi: Dropzonejs in EB multi-step...
Primsi’s picture

Status: Needs review » Fixed

Cool. Tested this with various widgets and it seems to fix the issue. Many thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.