• Resolved disagree

    (@disagree)


    My current blog url is in the format of https://sitename.com and the WP_CONTENT_URL is set for a cookie-less subdomain on another domain – where PHP is not enabled https://sitename.otherdomain.com ( it’s purely for fast content serving! )

    Due to that it seems that some features of WP_Insert are not working, such as country selection in the pop up. Google Chrome Inspector produces the following errors

    Failed to load resource: the server responded with a status of 404 (Not Found) https://sitename.otherdomain.com/plugins/wp-insert/includes/common/popups/countries.php?data=&target=wp-insert-inpostads-above-content-country_1
    ( most likely due to php being disabled, the country list however loads )

    Then when pressing the green OK button, after selecting a few areas, nothing happens with the following errors :
    Unsafe JavaScript attempt to access frame with URL https://sitename.com/wp-admin/admin.php?page=wp-insert&w3tc_note=flush_all&settings-updated=true from frame with URL https://sitename.otherdomain.com/plugins/wp-insert/includes/common/popups/countries.php?data=&target=wp-insert-inpostads-above-content-country_1. Domains, protocols and ports must match.

    Uncaught TypeError: Property 'jQuery' of object [object Window] is not a function

    These errors are straight-forward. The fixing would most likely be by using the site-url for the admin area features, so your script would stay on the same domain and would not have problems with dynamic .js through the php script.

    PS : Is it possible to set custom areas where advertisements will be placed? E.g. I’d like to have one ad area displayed in a certain pre-formatted box for example.

    https://www.ads-software.com/extend/plugins/wp-insert/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter disagree

    (@disagree)

    I tried it first with a partial fix was to add a condition into wp-config, which would only define WP_CONTENT_URL for the frontend, and not the backend;

    if( !defined('WP_ADMIN') ) { define('WP_CONTENT_URL', 'https://contentdomain'); }

    It wasn’t optimal, but worked. However I think it was due to WP_PLUGINS_URL not being set. Now after setting WP_PLUGINS_URL, the issue is gone.

    Plugin Author Namith Jawahar

    (@namithjawahar)

    WP_PLUGINS_URL is supposed to be always available..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content URL conflict if on another domain’ is closed to new replies.