• We have Polylang setup with multiple domains and this gives issues with Elementor.

    1. Cross domain errors
    When using multiple domains Elementor still encounters issues with the translations. Elementor forces the default domain to be used which results in cross domain errors.
    The problem happens because of the ELEMENTOR_URL constant. This uses the plugins_url and apparently that function doesn’t account for Polylang fixes at this point.

    I have found some fixes using this thread https://github.com/polylang/polylang/issues/590
    But this is not fully working correctly in all cases, see next item:

    2. Editing translations
    When editing a translation Elementor requires you to be on the translation domain, not the default.
    This causes issues once saving your changes as Elementor then resets the Theme Builder templates for the default language to the language you are working on.

    Let me know your thoughts, maybe you’ve already addresses some of these in the 2.0 beta?

    Cheers, Jory

Viewing 14 replies - 1 through 14 (of 14 total)
  • same issue, can’t access the other domain content with elementor to update it!

    Plugin Author Pacotole

    (@pacotole)

    Hi,

    This is a complex problem. I have been checking the link you have provided and one of the Polylang contributors has left a very interesting solution that I will try to integrate in our plugin.

    Thread Starter Jory Hogeveen

    (@keraweb)

    Hi @pacotole

    That was my solution ?? However, it’s not 100% bug free complete since it relies on mu-plugins.
    It will definitely enhance this plugin but any ideas on ditching the mu-plugins dependency would be great.

    Cheers, Jory

    • This reply was modified 2 years, 7 months ago by Jory Hogeveen.

    Hello @pacotole ,

    I have implemented that mu-plugin solution, but it still does not allow me to edit the 2nd addon domain, but I can load the website properly now (at least).

    Using latest version of both Elementor, Elementor Pro, Polylang and Polylang Connect

    Hi,

    I’m experiencing the same issue. May I know where to place the mu-plugin solution?

    I also get CORS policy issues with font-awesome assets by elementor, any ideas how to fix this?

    This is the broken language url: https://www-test.vineview.fr/

    Thank you!

    • This reply was modified 2 years, 7 months ago by mwbarican.
    Plugin Author Pacotole

    (@pacotole)

    Wow @keraweb, I didn’t realize you were yourself on github ??

    Your solution is very complete. In my tests everything worked except the admin-ajax.php url.

    Finally, the problem I encountered is that it was loading PLL_Frontend in the Elementor editor and didn’t detect the template language correctly. I fixed it with a 'pll_context' filter.

    As for the mu-plugin we are lucky and don’t need it, as WordPress loads plugins in alphabetical order we can add the filter in our plugin before Elementor is loaded.

    I have published a beta version to test it (see the changes).

    @pacotole I removed the mu plugin and added this beta, everything works fine, although the redirect requires you to login on 2nd domain (or any extra domain that is assigned to the language) it works just fine both editing and navigation.

    Plugin Author Pacotole

    (@pacotole)

    Great! As soon as I have some time I will post the update.

    Sync login between domains is a feature of Polylang Pro but I’m not sure if it works directly in wp-admin.

    • This reply was modified 2 years, 7 months ago by Pacotole.

    Oh man how long I was looking for this solution. The beta version helped.

    Plugin Author Pacotole

    (@pacotole)

    V2.1.0 with multi-domain CROSS domain fixed is here!

    I’m sorry for the delay. A lot of work and a one-year-old baby leave me with no time.

    There are a lot of queries in the forum that I will try to review and solve.

    @pacotole gr8, thanks for the update and congrats on your baby!

    I have a site with multiple domains (com and nl). For my second site (nl version) the wordpress admin bar is not showing and I can’t edit pages with Elementor when using the using the option “The language is set from different domains” in polylang.

    Anybody here knows about this is issue or knows how to fix this? Seems similar to what Im reading in this thread above.

    • This reply was modified 2 years, 1 month ago by cyle77.
    Plugin Author Pacotole

    (@pacotole)

    Hi @cyle77,

    By default, you only login for one domain. You also need to login in the second domain. I think that with Polylang Pro you can log in to all domains at the same time but now I can’t find it in the documentation.

    Thread Starter Jory Hogeveen

    (@keraweb)

    I think that with Polylang Pro you can log in to all domains at the same time but now I can’t find it in the documentation.

    This is automatic but isn’t very stable in all cases.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Cross domain issues’ is closed to new replies.