• Resolved champlainrac

    (@champlainrac)


    I’m getting some errors whenever I try to add an event (see below). It started about two weeks ago, for some reason… worked fine before that point. It seems to be related to WPML, but since the problem happens only when adding events, I suspect it might be more in Event Manager’s camp. Yet, if I disable WPML, I get no errors. Here are my plugin versions:

    • EVENTS MANAGER (5.5.3.1)
    • EVENTS MANAGER AND WPML COMPATIBILITY (0.3)
    • WPML MULTILINGUAL CMS (3.1.7.2)
    • WPML STRING TRANSLATION (2.0.9.1)
    • WPML TRANSLATION MANAGEMENT (1.9.6)

    Here are the errors I get when I provide an event name and date, but NO location:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
    SELECT translation_id FROM wp_icl_translations WHERE element_id=
    
    WordPress database error: [Duplicate entry '0-en' for key 'trid_lang']
    INSERT INTO <code>wp_icl_translations</code> (<code>element_type</code>,<code>trid</code>,<code>element_id</code>,<code>language_code</code>) VALUES ('post_location','','','en')
    
    WordPress database error: [Duplicate entry '13080-en' for key 'trid_lang']
    INSERT INTO <code>wp_icl_translations</code> (<code>element_type</code>,<code>trid</code>,<code>element_id</code>,<code>language_code</code>) VALUES ('post_event','13080','13080','en')

    And here’s what I get if I supply event name, date, PLUS a location:

    WordPress database error: [Duplicate entry '13081-en' for key 'trid_lang']
    INSERT INTO <code>wp_icl_translations</code> (<code>element_type</code>,<code>trid</code>,<code>element_id</code>,<code>language_code</code>) VALUES ('post_event','13081','13081','en')

    Please let me know if you feel this is more of a WPML sided issue, I’ll contact their support.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you tell us a bit about the language setup you’re using? That might help track down what the problem is…

    Thread Starter champlainrac

    (@champlainrac)

    Sure. Our content is 95% percent English, with some pages having French translations. We’ve translated pages and posts, mainly. We’ve never tried to offer multi-language events or other custom post types, so I’m not sure why WPML is involved (other than it being passively present, but unused when it comes to the event post type).

    I’ll reply again in a few with more info.

    Thread Starter champlainrac

    (@champlainrac)

    Okay, so I just wanted to add that I barely used the two extra modules: string translation and translation management. In fact, they’re disabled now just to avoid a performance cost.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry not getting this issue, just to narrow down the problem and help us debug the issue is it possible to try the following temporarily:

    – deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
    – switching to the default theme to rule out any theme-specific problems

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress database errors when adding an event (seems to be WPML related)’ is closed to new replies.