WordPress.org

Ready to get started?Download WordPress

Forums

CMS Tree Page View
[resolved] Broken for Languages with a '-' in (3 posts)

  1. matthewrudy
    Member
    Posted 3 years ago #

    my problem was that no posts were showing for chinese simplified or chinese traditional.

    after a bit of debugging I noticed it was because the cms_tpv_meta_wpml_language field was being set to "zh" instead of "zh-hans" or "zh-hant"

    the easy fix was to change the regexp to respect '-'s in the css class

    Here is my diff


    plugins/cms-tree-page-view/scripts/cms_tree_page_
    - var re = /cms_tpv_switch_language_code_([\w]+)/;
    + var re = /cms_tpv_switch_language_code_([\w-]+)/;

    http://wordpress.org/extend/plugins/cms-tree-page-view/

  2. Pär Thernström
    Member
    Plugin Author

    Posted 3 years ago #

    Cool, thanks for reporting and fixing this! I'll add your changes to the next version.

  3. Pär Thernström
    Member
    Plugin Author

    Posted 3 years ago #

    This should now be fixed in the current version of CMS Tree Page View.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic