Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author phbernard

    (@phbernard)

    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?

    Plugin Author phbernard

    (@phbernard)

    I asked the WPML team if I could get a free copy so I could debug myself.

    Thread Starter alextsoi

    (@alextsoi)

    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”.

    Thread Starter alextsoi

    (@alextsoi)

    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. https://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

    Plugin Author phbernard

    (@phbernard)

    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.

    Plugin Author phbernard

    (@phbernard)

    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?

    Plugin Author phbernard

    (@phbernard)

    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/

    Plugin Author phbernard

    (@phbernard)

    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.

    Thread Starter alextsoi

    (@alextsoi)

    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

    Plugin Author phbernard

    (@phbernard)

    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Report Error if using WPML together’ is closed to new replies.