Bug with taxomony in manager.php

  • sireneweb


    i found a bug with your plugin and WPML at line 329 in manager.php when you have a blog and create sub category for post.

    In fact, when you are at the base, the blog list all posts related to main and sub categories because CPT can’t find the posts in others languages.

    For example :
    Primary langage FR
    AND ( cpt_onomy_tt1.term_taxonomy_id IN (5,6,7,8,9)

    Secondary langage EN
    AND ( cpt_onomy_tt1.term_taxonomy_id IN (5)

    The bug comes from $new_where[] = $taxonomies[ 'where' ][] = "$alias.term_taxonomy_id $operator ($terms)";

    Maybe can you help me to find a good solution for this.


Viewing 6 replies - 1 through 6 (of 6 total)
  • usually with WPML you need to use the icl_object_id() function to get the ID of the post/page/cpt/category/tag you want in both languages.

    I am not familiar with the cpt-onomies plugin, but I can imagine you would need something in the lines of:

    cpt_onomy_tt1.term_taxonomy_id IN ( icl_object_id( array(5,6,7,8,9), x, false ) )

    where x is the cpt or taxonomy (not clear from your code)



    Yeah exactly, cpt_onomy_tt1.term_taxonom_id doesn’t find all taxomoy_id

    i must get this for French langauge
    AND ( cpt_onomy_tt1.term_taxonomy_id IN (5,6,7,8,9)

    and for English language
    AND ( cpt_onomy_tt1.term_taxonomy_id IN (12,13,14,15,16)
    but with CPT i get this
    AND ( cpt_onomy_tt1.term_taxonomy_id IN (12)

    That’s why it’s strange. I translate all my categories in two languages

    as I tried to explain above, to get any sort of ID for both languages in WPML you must use the function icl_object_id().
    More info on that via http://wpml.org/documentation/support/creating-multilingual-wordpress-themes/language-dependent-ids/ or you can contact me for a WPML Consult via http://senl.in/gBbL96

    Plugin Author Rachel Carden


    Hey guys. Wow. Let me get this next update out so I can get a few bug fixes and small things out of the way and then I will try my best to wrap my head around WPML.

    If you come up with a solution in the meantime, please let me know.




    Well i try but no effect

    @rachel perhaps this tool can help you in the right direction: http://wpml.org/2012/10/new-wpml-tool-speeds-up-theme-compatibility-conversion/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug with taxomony in manager.php’ is closed to new replies.
Skip to toolbar