• Resolved ellacologne

    (@ellacologne)


    Hi, I found a (seemingly) similar topic here: https://ww.wp.xz.cn/support/topic/cant-save-settings-56/

    The description is the same, the console shows a different error (in fact, 5 of them on plugin settings page load) though in the backend:

    Cross-Origin Request Blocked: The Same Origin Policy disallows
    reading the remote resource at https://googleads.g.doubleclick.net/pagead/id (Reason: CORS request did not succeed)

    WP Version 5.9.3 , Plugin latest version
    What I tried:
    * 3 different browsers, 2 of them without extensions and stuff, also using private windows – same problem everywhere
    * uninstalled almost all plugins
    * uninstall plugin and re-install
    * compare with other instances of this (staging) site (localhost, prod): same problem
    * jQuery: only the instance that comes with WordPress’ load-scripts.php
    * deactivated all custom scripts that might interfere
    * jQuery Version (via console): 3.6.0

    Additionaly (maybe related, maybe not), the frontend throws cross-origin errors only in Firefox, other (untouched) browsers display the videos.

    I’m not getting where this Google ad URL comes from … the settings page should not have any connection to YouTube, should it?

    Thanks for any hint where to further debug …

    • This topic was modified 4 years ago by ellacologne. Reason: fixed typos
Viewing 1 replies (of 1 total)
  • Thread Starter ellacologne

    (@ellacologne)

    OK … after even fiddling around with some of the options (as I could not save them, changed the field “youtubeprefs_alloptions” in wp_options in the database … but to no avail with ajax, debug options etc.) and having one more error message in Chrome’s devtools console, I found the reason.

    The additional error message was

    invalid form control with name 'height' is not focusable

    So I looked for a field with this name. It’s hidden behind the default dimension checkbox in the first (default) tab of the settings. If you click the checkbox and add some values in the field, saving is possible again. Need to say: there were values, but the default values seemed very small (some 120 or so). I couldn’t dig deeper into if the default values in youtube.php are wrong or the $_globals that are used there, however just reporting what I experienced, it might be helpful for somebody else.

Viewing 1 replies (of 1 total)

The topic ‘Cannot save settings, CORS/cross-origin errors’ is closed to new replies.