The form validate does not need to be called until we are done processin...

The form validate does not need to be called until we are done processing all of the images; this fixes the multiple image fields on the node creating multiple nodes bug; still need to handle multiple images within an image field.
So, this seems like that call to _image_field_form_process might need to be
sync , because we need the fids and images uploaded before saving the node
so they don't get lost?

On Mon, Nov 10, 2014 at 11:16 AM, Tyler Frankenstein <
notifications@github.com> wrote:

> In src/includes/form.inc.js:
>
> >        });
> >      }
> > -    else {
> > -      // There were no image fields on the form, proceed normally with form
> > -      // validation, which will in turn process the submission if there are no
> > -      // validation errors.
> > -      form_validation();
> > -    }
> > +    // validate the form
> > +    form_validation();
>
> @chrisschaub <https://github.com/chrisschaub> The call to
> _image_field_form_process() is async, so I don't think it is safe to
> proceed with the form_validation() until the _image_field_form_process()'s
> success callback is called on the final image field.
>
> Proceeding with the form validation (AFAIK) will cause the form to be
> submitted (AKA node POST) before the image(s) have been uploaded, and the
> file id(s) won't get attached to the node's field(s) properly.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/signalpoint/DrupalGap/pull/402/files#r20096358>.
>



-- 
Christopher Schaub
http://chris.schaub.com