• Hello.

    We just noticed that forms do not submit in older versions of Chrome (unsure when started, definitely fixed by 60.0.3112.90) and Firefox (at least 43.0.4, definitely fixed by 54.0.1).

    Steps to reproduce:
    1) Open basic contact form in older browser described above
    2) Complete and submit form

    Expected behavior:
    * Form submits, confirmation message displayed below Submit button, email received by site owner.

    Actual behavior:
    * Spinner icon appears beside Submit button, no confirmation message, no email sent or received, following error message in Dev Console:
    {“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}}

    This was reported to us by a client, as customers were unable to send emails. One team member was able to reproduce on Chrome and Firefox, but it works fine on Safari. Form submitted fine for me on all three browsers. After upgrading team member’s Chrome, form submits fine.

    In my browser, when successfully submitting, the REST API URL is:
    https://www.day-spa-ramstein.de/en/wp-json/contact-form-7/v1/contact-forms/2746/feedback
    In my team member’s browser, when failing to submit, the REST API URL is:
    https://www.day-spa-ramstein.de/en/wp-json/contact-form-7/v1contact-form-7/v1/contact-forms/2746/feedback

    Note the additional “v1contact-form-7/” in the second URL; not sure why the older browser would do this, but that is the issue.

    Hope this helps, happy to help test,
    Aaron T. Grogg

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yes this ‘undesirable’ feature came with changeset 1700668. A quick fix would be:
    …contact-form-7/includes/js # diff scripts.js_ORI scripts.js
    472c472
    < var url = wpcf7.apiSettings.root;

    > var url = wpcf7.apiSettings.root . ‘/’ ;

    Thread Starter Aaron T. Grogg

    (@aarontgrogg)

    Thanks, kochtopf, assume you meant:
    > var url = wpcf7.apiSettings.root + '/' ;
    (+ not .)

    But sadly that did not help either… The odd part is that two different versions of Chrome and Firefox, both on OSX, get two different URLs for submitting the form…

    The one that breaks has an additional v1contact-form-7/ (or /v1contact-form-7, depending how you look at it).

    Anyhow backed up to v4.8 and seems to work fine now, guess will wait for next update and try again…

    Cheers,
    Atg

    Aaron,
    No it should be a . – means append a slash. This would allow the next url.replace to match and let it remove the double /v1… Give it a try it’s working for me. Alternatively you could backout changeset 1700668.
    PS: Since this is a js clear all caches/proxies before trying… RGDS

    Thread Starter Aaron T. Grogg

    (@aarontgrogg)

    Thanks, already rolled all the sites back, either way will trigger an Update when update is released… ??

    Appreciate the help,
    Atg

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP REST API breaking in older Chrome and Firefox’ is closed to new replies.