Support » Plugin: CMS Tree Page View » Custom posts with "-" in post_type

  • Resolved IllusionMH

    (@illusionmh)


    When I’m using TPV plugin in pages with custom posts that contain “-” (dash) in post_type I have JS error in console, because JS engine interprets this as minus

    Uncaught exception: ReferenceError: Undefined variable: products
        cms_tpv_jsondata.companyname-products = [			{

    I propose to change 864 line in functions.php
    from

    cms_tpv_jsondata.<?php echo $post_type ?> = <?php echo $json_data ?>;

    to

    cms_tpv_jsondata["<?php echo $post_type ?>"] = <?php echo $json_data ?>;

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

Viewing 1 replies (of 1 total)
  • Plugin Author eskapism

    (@eskapism)

    Ah, didn’t think those could contain that. Nice catch, will test and add your fix to the next version.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom posts with "-" in post_type’ is closed to new replies.