Larajax bug OCv4.1.15 and OC v4.1.19: request handler submitted twice

I have a registration form that used to work fine but now it seems that the ajax handler is submitted twice

<form
    data-request="{{ __SELF__ }}::onRegisterAccount"
    data-request-validate
    data-request-flash="*"
    data-request-files
    data-request-update="'{{ __SELF__ }}::register-confirmation':'#update-partial'"
>

I can see in the DevTools the 2 requests:

Hey @chris,

Is it possible that {% framework %} or {% framework extras %} are included more than once in your layout or pages?

1 Like

Hi @apinard

thanks for jumping in

On OC v3, the code is working fine.
On two different instances of OC v4, this code is submitting twice the request AjaxHandler, and therefore the code behind is creating 2 users, in that case.

As a workaround, I had to put the code behind a DB:transaction with a lockTables

and yes I have only one in the code.

oh ! But I found a hidden different version of it indeed.

<script src="{{
    [
        '@jquery',
        '@framework.extras',
    ]|theme
  }}"></script>