An umlaut domain would read like this:
ipl-geräte-vergleich.de
As a URL in the browser, however, it gets decoded like this:
http://xn--ipl-gerte-vergleich-mwb.de/
WP Rocket’s config file needs to be named after the decoded version:
xn--ipl-gerte-vergleich-mwb.de.php
Currently it gets named after the encoded version, though:
ipl-geräte-vergleich.de.php
Hence, no config file found, no caching.
_(Relevant ticket: https://secure.helpscout.net/conversation/265298676/24516/?folderId=714999)_
for reference: http://php.net/manual/fr/function.idn-to-ascii.php
I think this should be fixed in a major version release so that we can take advantage of our elaborate QA process.
Even though the change in minor (in the grand scheme of things), changes related to config files can break the internet.
Also, hello Caspar 😘
@arunbasillal We can do that for 3.7. I guess we need to buy a umlaut domain to be able make the QA?
@GeekPress I think we can test using the hosts file on windows (and something similar on mac).
It would be good to have a live site with this kind of domain name for testing
Identify the root cause ✅
Cause is in the original comment for the issue
Scope a solution ✅
when generating the filename for the config file in get_rocket_config_file(), we need to use the idn_to_ascii() function to have the correctly encoded filename.
While this is simple, it's a good opportunity to refactor the code handling the config file generation. The current code is old and very complex.
I recommend to create a new class Config in Engine\Cache to handle this. We will replace & deprecate get_rocket_config_file(), and also update rocket_generate_config_file().
Estimate the effort ✅
I think it's an [M] task, because there is quite some refactor to do, and new tests to write for all of this
_(sticks head in the door)_ Respectfully reporting we still have umlauts in German and, as annoying as they may seem, they are not likely to disappear any time soon. 👋🙂 Cheerio! (_retreats_)
Most helpful comment
_(sticks head in the door)_ Respectfully reporting we still have umlauts in German and, as annoying as they may seem, they are not likely to disappear any time soon. 👋🙂 Cheerio! (_retreats_)