We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16858
    • 58 Posts
    After months of using ModX the lightbulb finally went off for me as to what Template Variables can do. Don’t know why they never clicked with me before.

    However, I have encountered a problem. ( I am using 0.9.6). If I select text box or drop down the template variable works perfectly. If I select textarea or rich text area as the template variable type, the data does not save. Has anyone else encountered this problem and what should I do to correct the issue?
      • 33372
      • 1,611 Posts
      There is a related issue you might investigate here:
      http://modxcms.com/forums/index.php/topic,14806.msg96380.html#msg96380

      In this case the value is not saved if your browser fills it in for you (as previously-entered text), so this may not have anything to do with your issue.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 7455
        • 2,204 Posts
        javascript does not pickup browser filled data modx uses js to see if the fields are filled but only when its done manualy.

        dimmy
          follow me on twitter: @dimmy01
          • 16858
          • 58 Posts
          ya kinda lost me there Dimmy ...

          again, my problem is that if I create a textarea or rich text box template variable, any information I type in those boxes are lost when I click on Save. I have even tried reinstalling the manager directory but that did not help. Also, when choosing rich text as the template variable are the formatting tools suppose to appear? In my case, they do not.

          Looking forward to someone smarter than me answering this question smiley

          You guys rock. (and gals)
            • 6726
            • 7,075 Posts
            I had the same problem and used the fix (see ZAP link above) and it now works, try it out !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 33372
              • 1,611 Posts
              I just coincidentally had the exact same problem that you’re having today (a rich text TV not saving). Although this is somewhat different from the original issue that caused me to look into this problem in the first place (TV values filled in by browsers’ autotext features not being saved), I decided to try my fix for that issue because I could imagine it being a related problem. And lo and behold it did fix it.

              So apparently there is a general problem with the dirty var JavaScript routine keeping TV values from being updated sometimes. All my fix does is to disable that logic when saving the document so that all TV values are saved whether or not they’ve been registered as changed by this script. This should probably be addressed using REPLACE INTO syntax in the SQL or some other server-side method instead of JavaScript anyway.

              Bug report here: http://modxcms.com/bugs/task/875
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 6726
                • 7,075 Posts
                Yeah there is, I had to uncheck the double alias verification in Configuration lately, as it displayed an error every time I saved a document... (Still a Latin1 website, no issue for my UTF-8 installs).
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 33372
                  • 1,611 Posts
                  Another MODx 0.9.6 install on a different server and it also has the same problem as above. Again the fix above took care of it. I don’t think I’ve had this problem with rich text TVs in versions prior to 0.9.6 (I would’ve noticed), but it seems to be a consistent issue in that release.
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I did a stupid and completely broke TV saving. I accidentally put [*name*] in the Variable Name field, instead of simply name. It took me two days to figure out that it wasn’t a bug in MODx, just one in my brain!
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 19802
                      • 7 Posts
                      I have the same problem with MODx 0.9.6.1 version.
                      Template Variables won’t save. I tried the Zap’s trick but no luck.

                      Default values display properly, but when i Change the value it doesn’t get saved