We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15865
    • 6 Posts
    I’ve loaded a MODx setup & config into a webserver (which I haven’t access to the MySQL module), and have created some documents, templates & template variables. I’ve also loaded all images into the webserver.

    I have assigned some TV’s to some templates, and later created some documents with that templates. I’ve done this: (Right Click in a document) > Edit document > (go to the bottom of the site and insert some images’ path (using the "insert" button, and the file manager tool) in the TVs’ textbox). When I save that document, and then return to modify again the TVs, the path is empty (so I guess that it has never been saved).

    Another issue is that, if I try to edit those TVs from the QuickEdit Module, these TVs are saved, so I don’t understand what is happening with this problem. Opengeek told me via IRC to modify MySQL mode settings: sql_mode = ’STRICT_...’ change for: sql_mode = ’’. I had asked the Webserver Team to modify this setting, and they told me that the changes have been done, but the problem persists.

    Did I forget some bug or perhaps some common dilemma with this version of MySQL? Any generous hand that could provide me a partial solution would be very thanked! (If this post should have be posted on Bug reports, I apologize for that and asked some Admin to move it there smiley )

    Pre-thanks for answering...

    Alan.

    MODx:Version: 0.9.6.1p1
    Database: MySQL Ver 14.12 Distrib 5.0.45.
    Apache/Os@Web Server: Apache v2.2.4, Windows Vista
    Browser/OS@Client: Firefox v2.0.0.11, Ubuntu 7.10 w/Gnome
      • 15865
      • 6 Posts
      Solved!

      The problem was the following: one of the TVs was called "title image". I found that, when the TVs are named like "name secondname" like "title image" or "upper title", MySQL doesn’t try to save the value that I inserted before submitting changes. If the change is done from QuickEdit, MySQL do save the value in the right TV name, so I guess it’s a problem with the "data reading & sending to the MySQL DB" of the content manager.

      The partial solution was replacing the middle blank space for an underscore. So, the TV now is called "title_image" and there is no problem at all.
      I reported this as a bug, http://modxcms.com/bugs/task/1017. Hope this weird experience could help anyone.

      Cheers!
      Alan.
        • 25663 MODX Staff
        • 12,272 Posts
        Thanks for the bug report KillerQueen... that’s a silly one that hopefully will be resolved in 0962.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 10487 MODX Staff
          • 1,535 Posts
          Well, I’ve looked into the issue and it appears that PHP replaces spaces with underscores as part of the postback which would cause this behaviour.

          The thing is, I can’t think of a safe way of working around this to allow spaces without possibly breaking current implementations of MODx. Any ideas welcome but I think it’s best to have a ’no space’ policy.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 25663 MODX Staff
            • 12,272 Posts
            I think so too; my expectation would be to pop a warning saying to remove spaces and special characters from TV names ... should only be a-z, A-Z, 0-9, and . _ - allowed.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 15865
              • 6 Posts
              Quote from: rthrash at Feb 22, 2008, 07:23 PM

              I think so too; my expectation would be to pop a warning saying to remove spaces and special characters from TV names ... should only be a-z, A-Z, 0-9, and . _ - allowed.
              That could be a good partial solution... smiley Or perhaps, replace blank spaces into underscores automatically when reading the TV names (and obviusly, saving it with the modified name).
                • 22303 MODX Staff
                • 10,725 Posts
                We basically are saying that the TV names are limited to PHP variable naming conventions here, so a lot of other characters will need to be validated as well; even what position the character in will matter (PHP vars can’t start with a underscore right?).