• Resolved agenturanmut

    (@agenturanmut)


    Hello,

    We are currently experiencing an issue with your plugin when used in conjunction with WPML.

    I use WPML to translate my website into four additional languages. However, a serious error is currently occurring: it appears that a duplicate database query is being executed, which results in a database error.

    As a result, taxonomies are corrupted, and all posts or content types linked to taxonomies are no longer displayed correctly.

    Here is an example of a faulty (duplicated) SQL query:



    SELECT COUNT(*)
    FROM wacdp_comments JOIN wacdp_icl_translations icltr2
    ON icltr2.element_id = wacdp_comments.comment_post_ID JOIN wacdp_posts
    ON wacdp_posts.ID = icltr2.element_id
    AND CONCAT('post_', wacdp_posts.post_type) = icltr2.element_type
    LEFT JOIN wacdp_icl_translations icltr_comment
    ON icltr_comment.element_id = wacdp_comments.comment_ID
    AND icltr_comment.element_type = 'comment' JOIN wacdp_icl_translations icltr2
    ON icltr2.element_id = wacdp_comments.comment_post_ID
    AND wacdp_posts.ID = icltr2.element_id
    AND CONCAT('post_', wacdp_posts.post_type) = icltr2.element_type
    LEFT JOIN wacdp_icl_translations icltr_comment
    ON icltr_comment.element_id = wacdp_comments.comment_ID
    AND icltr_comment.element_type = 'comment'
    WHERE ( comment_approved = 'spam' )
    AND comment_type NOT IN ('note')
    AND icltr2.language_code = 'de'
    AND (icltr_comment.language_code IS NULL
    OR icltr_comment.language_code = icltr2.language_code )
    AND icltr2.language_code = 'de'
    AND (icltr_comment.language_code IS NULL
    OR icltr_comment.language_code = icltr2.language_code )

    My questions:

    Is this issue known when used with WPML?
    Is there a recommended solution or workaround?
    Can I configure this behavior somewhere, or does a fix need to be implemented in the plugin?

    Thank you very much for your support! We could also provide admin access

    Best regards

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @agenturanmut,

    Thank you for reaching out and for sharing the detailed SQL query along with the support thread.

    After reviewing the query and checking the topic, I’d like to clarify that this issue is not directly related to the User Registration & Membership plugin.

    From what we can see, the query mainly interacts with:

    • WordPress core tables (comments and posts)
    • WPML’s translation table (icl_translations)

    Please note that the User Registration & Membership plugin does not run queries on the comments or WPML translation tables.

    We have also created a ticket and passed this to our development team. If we find that this issue is related to our plugin, we will include a fix in an upcoming update.

    Thank you for your patience!

    Thread Starter agenturanmut

    (@agenturanmut)

    Hello,

    thank you for your response and for forwarding this to your development team.

    I just wanted to follow up and clarify our findings. From our side, the issue seems to be related to queries triggered by the plugin in the context of multilingual functionality. While the query itself involves WPML tables, it appears to be initiated or influenced by the plugin, which in our setup leads to duplicated JOINs and ultimately causes the database error.

    Because of this, taxonomies become corrupted and posts associated with them are no longer displayed correctly.

    Could you please take another look at the interaction between your plugin and WPML, especially regarding multilingual queries? It would be great if this behavior could be reviewed and potentially adjusted.

    Please let me know if you need any additional information or testing from our side.

    Best regards,

    Hi @agenturanmut,

    Thank you for the detailed report and for your patience.

    After a thorough investigation, I have identified a few things.

    When WPML is active, and a secondary language is selected, our plugin’s form-fetching query does not explicitly bypass WPML’s language filter. WPML intercepts the query via pre_get_posts and filters results
    to the current active language. Since registration forms are created in the default language only, WPML causes the query to return empty, which then triggers a second fallback query. This results in the
    double query you observed, and is why forms and taxonomy data are no longer displayed correctly in non-default languages.

    This has now been fixed. We have added ‘lang’ => ” to the query arguments in both the primary and fallback form-fetching queries. This explicitly tells WPML to skip language filtering for registration
    forms, since forms are backend objects and are not language-specific content.

    The fix will be included in our next release. In the meantime, if you need an immediate resolution, please reach out to us directly and we can provide you with the patched files.

    We apologize for the inconvenience this has caused and appreciate you bringing it to our attention.
    Best regards,

    Thread Starter agenturanmut

    (@agenturanmut)

    Hello,

    thank you very much for the quick response as well as providing a solution — we really appreciate your support.

    Could you please provide us with the patched files as soon as possible so we can apply the fix immediately on our end?

    Additionally, could you let us know when the next official release including this fix is planned?

    Thank you again for your assistance.
    As soon as we get the fix we mark this discussion as solved.

    Best regards

    Thread Starter agenturanmut

    (@agenturanmut)

    Hello,

    It would be great if we could finalise this now by simply sending us the patch.

    Best regards

    • This reply was modified 1 month, 3 weeks ago by agenturanmut.
    Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @agenturanmut,

    Thank you for your patience.

    We have prepared a patch ZIP file for you. Please download it from the link below and install it on your site: https://limewire.com/d/JrD1S#cDyYj6jcHr

    After replacing the plugin, kindly let us know whether the provided solution works for you.

    Best regards!

    Thread Starter agenturanmut

    (@agenturanmut)

    Hello,

    We have replaced the plugin with the patch you provided.

    Unfortunately, we are still experiencing the same issue.

    Could you please take another look at this?

    Best regards

    Thank you for your patience.

    Please find the patch attached. https://limewire.com/d/bOXvo#w3Tkbvygjj,
    Then visit wp-admin → Plugins once to activate the fix.

    If the issue persists, please contact us directly so we can investigate further on your site.
    Best regards

    Thread Starter agenturanmut

    (@agenturanmut)

    I have opened a support ticket via https://wpeverest.com/.

    I will therefore close this ticket.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.