Thank you for reporting! I didn’t know about this.
WPML is a non-free plugin so I’m not sure I can test this issue easily. Could you copy/paste your workaround? It may be enough to let me understand the exact problem and fix. And also a sample Ajax URL: yours ends with “XXX” but this is not what WPML really does, is it?
I asked the WPML team if I could get a free copy so I could debug myself.
I am sorry, I just saw your reply. I will upload the sample code of the file with incorrect ajax url within today. For WPML, I think you may need to ask WPML team since there are multiple plugins for WPML.
My simple guess is “WPML probably added a function to a hook for building url”.
The problem is the value of a variable called $ajax_url is wrong in line 236 of the attached file. The ajax request URL return 404 such that it makes the plugin unable to work.
I saw the language slug is added in the $ajax_url, i.e. http://YOUR_DOMAIN.com/en/admin_ajax.phpXXXXX, and if I remove the language slug, the ajax request will be processed successfully. Since I don’t have time to check on the details, but I think the WPML may did something while generating the variable $ajax_url.
P.S. my default website language is not english, but chinese, so the site may automatically add some language slug to the URL.
P.S. only line 236 of the attached file ( appearance.php ) is changed, otherwise are same as the RealFaviconGenerator plugin.
Temp link: https://github.com/alextsoi/temp-fix-RealFaviconGenerator/blob/master/appearance.php
Thanks for the feedback. I also received a copy of WPML, so I will be able to reproduce and fix. Probably this week, I hope tomorrow.
Well I can’t reproduce with my local WPML install.
The issue you encounter has already been reported: https://wpml.org/forums/topic/admin_url-returns-incorrect-value-since-3-3-x/ . And because the post is closed, I’m wondering if the issue was actually fixed. I’m using WPML Code 3.3.6. Which version do you use?
Apparently the issue was fixed in 3.3.4 (or 3.3.5 maybe ? The release notes page mentions both versions): https://wpml.org/2015/12/wpml-3-3-5-improves-stability-performance-and-integration/
This fix in WPML 3.3.4 really looks like the solution. I completely understand if you have no time to dedicate to test it. If I don’t hear from you in a few days I’ll close this ticket.
Sorry for the late response, and my version (3.2.7) is older than 3.3.4, so the problem I mentioned may be fixed in newer version. Sorry again for helping me checking the code for a long time ><
Please feel free to close the ticket. Thank you very much
The worst thing for a plugin editor are users who get an error but keep it for them. So thank you for having reported this issue in the first place!
For now I will assume the issue is fixed in the latest version of WPML. Of course, post again whenever you upgrade WPML and if you still get the error.