We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24278
    • 165 Posts
    Hi,

    I have a TV (checkbox) but when I choose the options nothing gets saved.

    I have attached screen shots of the TV Creation provess and the Selection process.

    When I pass a Default value to the TV, it shows as CHECKED but when I uncheck the same, save the document and re-open the document, it still shows the option as checked.

    Please can someone advice me on where I am going wrong.

    regards,

    -raavi
      • 10487 MODX Staff
      • 1,535 Posts
      Hi Raavi, did you ever find out what the problem was?

      I’ve just encountered the same problem on a local test install running PHP 5.1.1 and mySQL 5.0.18. sad

      What versions of PHP and mySQL are you running? I’ve got it running fine on my live site which uses mySQL 4.something and PHP 4.4.2.

      Cheers, Garry

        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 6726
        • 7,075 Posts
        Does it exhibit the same behavior with single select ?

        I have found out that multiple select box do not work properly (it was some time ago though, with 0.9.1)
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 10487 MODX Staff
          • 1,535 Posts
          Thanks David - I tried it with single-select and everything works okay. The problem does indeed seem to be limited to multi-select lists and checkboxes.

          Also, I tested across 0.9.2.1 and an old test install of 0.9.1 and the problem appears across both versions.

          I’ve had a look through the bugtracker and can’t find this logged anywhere so I’ll track it later today.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 33453
            • 141 Posts
            I had this problem earlier here. It went away when I renamed the TV. I thought it might be because I had a space in the TV name, but Raavi does not in his, so I guess it’s a wider issue.

            I have used a multi select tick box for sidebar content selection without any problems since 0.9.
              • 32963
              • 1,732 Posts
              Hi,

              You might want to try out these lines 228-234 save_content.processor:

              				// handles checkboxes & multiple selects elements
              				$feature_insert = array();
              				$lst = $_POST["tv".$row['name']];
              				while (list($featureValue, $feature_item) = each ($lst)) {
              					$feature_insert[count($feature_insert)] = $feature_item;
              				}
              				$tmplvar = implode("||",$feature_insert);
              
                xWisdom
                www.xwisdomhtml.com
                The fear of the Lord is the beginning of wisdom:
                MODx Co-Founder - Create and do more with less.
                • 10487 MODX Staff
                • 1,535 Posts
                Great fix, Raymond! grin Tested it this morning and it does appear to solve the problem.
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 6726
                  • 7,075 Posts
                  I am going to test this, thanks Raymond grin
                  we should remember to have this patched in the next rev !
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 24278
                    • 165 Posts
                    Sorry for the delay in replying, was traveling for the last few days.

                    Thank you all for you excellent support!!!

                    Raymond,

                    It works!!!

                    Thank a tonne.

                    -raavi
                      • 32963
                      • 1,732 Posts

                      Glad I would help out smiley Thanks for sharing

                      PS. Please remember to update the bug btracker with this fix so it can be in the next release.
                        xWisdom
                        www.xwisdomhtml.com
                        The fear of the Lord is the beginning of wisdom:
                        MODx Co-Founder - Create and do more with less.