We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1048
    • 4 Posts
    hi all

    I have created a TV and it displays fine inside my document edit screen, no problem with that. But when i choose a value(it’s a dropdown list) and save the edited document the TV is not saved and remains the same.

    I have used TV’s on a different server and my current working implementation of Modx is actually an installation with its Database content copied from the other server. The TV’s worked fine on the other server.

    I hope anyone of you have an idea where the problem could be found, its probably a small thing but i dont know where to look.

    Thanks for your time if you have read this.
      • 18397
      • 3,250 Posts
      Seems this post slipped through my keys.........

      Could you provide more details how you copied the database content? Did you move the entire db or just some tables?
        • 9191
        • 20 Posts
        I’m having the same problem... I’m testing it locally with php 5.1.2 and Apache on Windows if it matters.
          • 32241
          • 1,495 Posts
          Alex, could you guys provide the server description of when the tv is working, as well as when it’s not working.
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 9191
            • 20 Posts
            OK, I spent some time poring over the code and found what was causing this problem for me, maybe someone can clarify why it’s happen.

            The issue was that the POST variable variablesmodified wasn’t being set. It’s being POSTed but it just has no value so the check
            if (in_array($row['name'],$variablesmodified))
            (\manager\processors\save_content.processor.php, line 240) fails every time. Changing it to
            if (true || in_array($row['name'],$variablesmodified))
            makes it work.

            I’m guessing that this is supposed to be set by Javascript, but it’s not with Firefox 1.5 on Windows 2000 (Javascript enabled, no extensions that should have any effect on Javascript). Is my fix safe to leave on? (Can’t imagine why it wouldn’t be, just an extra database hit)
              • 25663 MODX Staff
              • 12,272 Posts
              evan, very nice catch, thanks!

              Could you please log this in our bugtracker for 0.9.2?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 9191
                • 20 Posts
                actually I found the REAL problem, see if you can spot it (this is in the HTML source for the manager page when I’m editting a page)
                	if (confirm('<?=$_lang['tmplvar_change_template_msg']?>')){
                		documentDirty=false;
                		document.mutate.a.value = 27;
                		document.mutate.newtemplate.value = newTemplate;
                		document.mutate.submit();
                	}

                (hint: I have short_open_tag set to Off on php.ini)

                I’ll post it on the bug tracker.

                EDIT: is there a CVS or something I can just commit the necessary code change to? it’s literally like eight chars.
                  • 20688
                  • 1 Posts
                  Not sure if this is a regression, or not - but in the latest release 0.9.5 the content does not save in TV’s - the code posted by the topic starter fixes the problem, but the cause is different.

                  Any Ideas?
                    • 10313
                    • 375 Posts
                    Hi,

                    I’m having a similar problem. Have 3 TVs for my template. The first two are just text fields, the third is an image selector. Now, in some documents, I cant save any value into the first TV, the other two work. But in other docuements, it works fine.

                    I’m using MODx 0.9.6

                    Any ideas?
                    Martin
                      • 6726
                      • 7,075 Posts
                        .: COO - Commerce Guys - Community Driven Innovation :.


                        MODx est l&#39;outil id