We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31457
    • 5 Posts
    I create a drop list TV named "contentView" and with "default==article||News List==newslist||Image News List==imgnewslist" etc. to try to rebuild the view of content, don’t show content as default, just use tvs "contentView" to rebuild it, but when I change the value of TV, the tv value of old documents can’t refresh to new value, so I have to use the mod "Doc Manager" to rebuild the value of them.

    But when I click tab "Template Variables", and after click the radio button of template twice, the word "No template has been selected." dispeared but the TVs don’t come out. I am not sure what’s wrong with it. Everything else worked correctly.

    Could anybody help me ? How about the DOC Manager of you.

    Thanks a lot!
    vFire
      • 17883
      • 1,039 Posts
      I create a drop list TV named "contentView" and with "default==article||News List==newslist||Image News List==imgnewslist" etc. to try to rebuild the view of content, don’t show content as default, just use tvs "contentView" to rebuild it, but when I change the value of TV, the tv value of old documents can’t refresh to new value, so I have to use the mod "Doc Manager" to rebuild the value of them.

      TVs are stored in the database for each document seperately. If you change one TV, it is only changed for that particular document. So no bug here, it´s a feature.

      But when I click tab "Template Variables", and after click the radio button of template twice, the word "No template has been selected." dispeared but the TVs don’t come out. I am not sure what’s wrong with it. Everything else worked correctly.

      Tested with 0.96RC there doesn´t seem to be a bug. When I select a template, all assigned TVs appear.

      Could you describe more precisely what you want to achieve? Perhaps a folder structure combined with the @inherit binding could solve your problem.
        • 31457
        • 5 Posts
        Thanks for your kindly answer, I found the problem, it is a bug of table prefix located in tv.ajax.php.

         	$sql = "SELECT * FROM `modx_site_tmplvars` tv LEFT JOIN modx_site_tmplvar_templates ON tv.id = modx_site_tmplvar_templates.tmplvarid WHERE modx_site_tmplvar_templates.templateid ='". $_POST['tplID']."'";


        Should be

         	$sql = "SELECT * FROM ".$modx->getFullTableName("site_tmplvars")." tv LEFT JOIN ".$modx->getFullTableName("site_tmplvar_templates")." ON tv.id = ".$modx->getFullTableName("site_tmplvar_templates").".tmplvarid WHERE ".$modx->getFullTableName("site_tmplvar_templates").".templateid ='". $_POST['tplID']."'";


        Thanks a lot.
          • 17883
          • 1,039 Posts
          Could you add this to the bug tracker? Thx!
            • 10487 MODX Staff
            • 1,535 Posts
            It’s been fixed already for 096 after RC3 came out. smiley Can’t remember which FS number the bug report had ...

            EDIT: Here we go, it was FS#803.
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com