The preview could not load due to misconfigured URLs (IDN Domain)

Hello,

When I try to edit a page with Pro I get the error “The preview could not load due to misconfigured URLs…”. See also in the attached image. .

It seems Pro/Cornerstone have issues with IDN domains. Can you fix this?

Kind regards, Stephan

Hello Stephan,

Thanks for asking. :slight_smile:

I suggest you to please take a look at the solution mentioned in following post for misconfigured URL error message:

Let us know how it goes.

Thanks.

Thanks, I checked the configuration and the URLs are the same for WP_HOME, WP_SITEURL and in the address bar.

Hi there,

I see the problem now. That is because of the u with double dots at the top character in the domain. As you can see in the error message. There are an IDN version and the normal version difference. Please change the settings and add the IIDN version of the domain as the Site and Home URLs.

So you will need to add https://www.xn--berhrbar-85a.ch

Thank you.

Thanks again for your reply. If I change the configuration, Wordpress will also use that value in emails and other places, which I find not really feasible. Users will be confused.

Can you not just add a call to the PHP function idn_to_ascii() at some point in your code before this error occurs? That would be the clean solution, IMHO.

Kind regards, Stephan

Hi Stephan,

add_filters( 'home_url') and add_filters( 'site_url') might help. See this guide: https://developer.wordpress.org/reference/hooks/home_url/

About your suggestion, I will forward this to our developer for investigation first before we suggest implementation. This is to make sure no side effect on the functionality of how things are currently working. Thank you for understanding.

Thanks a lot. I’ll check out the filters.

And btw: In Customizer, the preview works fine. It’s just in Pro that it doesn’t.

Kind regards, Stephan

Let us know how it goes,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.