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?
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.
javascript does not pickup browser filled data modx uses js to see if the fields are filled but only when its done manualy.
dimmy
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
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
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
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.
-
☆ 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!
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