Support » Plugin: Multidomain support for Elementor » Elementor Editor does not load

  • Hi there,

    My setup has two domains: default.domain and second.domain

    Your amazing plugin perfectly fixes the frontend for the second.domain

    Unfortunately, the Elementor Editor for the second.domain does not load.

    I can see there is a POST request to default.domain/wp-admin/admin-ajax.php that fails. Its data is the following

    actions: {“get_widgets_config”:{“action”:”get_widgets_config”,”data”:{“exclude”:{“common”:true,”heading”:true,”tabs”:true,”shortcode”:true}}}}
    _nonce: 0c694a862d
    editor_post_id: 1708
    action: elementor_ajax

Viewing 2 replies - 1 through 2 (of 2 total)
  • For me, Elementor editor (latest version, 2.7.3) is loading, but I can’t save changes in the extra language domains. The message says that the connection is broken and that changes will be saved once connection is restored.

    Tried both htaccess methods. Using OceanWP theme, latest version.

    Hello all. I had same issue and used a few days in frustration. But finally i have a fix for elementor multi domains support on single site. If you used this plugin and enable the right Cors policy in your htaccess. I use the following:

    <FilesMatch “\.(css|js|ttf|ttc|eot|woff|woff2|otf|svg|gif|ico|webp|png|php|jpe?g)$”>
    <IfModule mod_headers.c>
    SetEnvIf Origin “http(s)?://(www\.)?(website\.com|website\.se|website\.co.uk)$” AccessControlAllowOrigin=$0
    Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
    Header set Access-Control-Allow-Methods: “*”
    Header set Access-Control-Allow-Headers: “Origin, X-Requested-With, Content-Type, Accept, Authorization”
    Header merge Vary Origin
    </IfModule>
    </FilesMatch>

    The issue then is that your ajax-admin.php still uses the original path/url when you try to edit a page thats on an other domain. You should do following.

    1. add following to you wp-config file
    define(‘WP_SITEURL’, ‘https://&#8217; . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_HOME’, ‘https://&#8217; . $_SERVER[‘HTTP_HOST’]);

    2. add following code to functions.php in the theme you are using:
    function modify_adminy_url_for_ajax( $url, $path, $blog_id ) {
    if ( ‘admin-ajax.php’ == $path ) {
    $url = ‘admin-ajax.php’;
    }
    return $url;
    }
    add_filter( ‘admin_url’, ‘modify_adminy_url_for_ajax’, 10, 3 );

    This will make url work on multi domains by making the paths relative.

    This is testet and working with polylang multilingual plugin.

    Hope this helps all you folks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Elementor Editor does not load’ is closed to new replies.