reatlat / wp-multidomain-support-for-elementor

This plugin will help those who have a Multilanguage website with a multi-domain structure, the plugin will add to Elementor Page Builder the support for multi-domains structure.
https://wordpress.org/plugins/multidomain-support-for-elementor/
GNU General Public License v3.0
9 stars 3 forks source link

Followed your How to but still have Issues. #4

Open sebgri opened 4 years ago

sebgri commented 4 years ago

Hi,

I followed your hoe to in the video. Elementor is installed, Your Plugin is installed, altered the nginx config w your code but still after switching it keeps spinning the elementor pamel on the left side and says connection lost.

I refreshed the cache. but nothing changes. The console still says that there are issues.

What is needed that you may can help me?

Thanks,

Seb

nicmare commented 3 years ago

same problem here

reatlat commented 3 years ago

@nicmare take a look here https://github.com/reatlat/wp-multidomain-support-for-elementor/commit/1e9c22ff68f019accc780a74bcf71af866a0255f try to use last version from this repo

There are filters for allowed_http_origins and add_allowed_origins.

You can use them to set the proper Access-Control-Allow-Origin header in the response to your AJAX call.

Add this to your theme's functions.php file:

add_filter('allowed_http_origins', 'add_allowed_origins');

function add_allowed_origins($origins) {
    $origins[] = 'https://www.yourdomain.com';
    return $origins;
}
clonecorp commented 3 years ago

@nicmare take a look here 1e9c22f try to use last version from this repo

There are filters for allowed_http_origins and add_allowed_origins.

You can use them to set the proper Access-Control-Allow-Origin header in the response to your AJAX call.

Add this to your theme's functions.php file:

add_filter('allowed_http_origins', 'add_allowed_origins');

function add_allowed_origins($origins) {
    $origins[] = 'https://www.yourdomain.com';
    return $origins;
}

Hello,

I have tried adding the code to the function file but I still get admin-ajax.php results in a 400 when editing the page with Elementor and because of that the left panel from Elementor loads forever.

The pages I am trying to edit are on subdomains fr.mydomain.com and ru.mydomain.com

Can you help?

Thank you, Jordan.