We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42049 ☆ A M B ☆
    • 250 Posts
    Really weird one here, nothing untoward, just MIGX and a select list TV on this template. I've tried making them blank/empty, still produces the error upon save, all other templates are fine and save as they should. But for some reason this just hangs, and produces the error in the attachment.

    It must have only just started this, as we put all the content in prior! Was just going over it all again for final QC and then got this message!

    Any one have any ideas or things for me to try? Supposed to be presenting this to the client tomorrow...

    Thanks guys!
      GEL STUDIOS
      MODX Professional | MODX Ambassador

      Website | Email | Twitter | Facebook
      • 23018
      • 353 Posts
      How many items do you store in your migx grid?

      I had a similar problem and it was caused by some server security kicking in because of the post size.

      Can you post the content of the error console after you have clicked on the red arrow in front the error?

      Cheers,

      pepebe
        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
        • 42049 ☆ A M B ☆
        • 250 Posts
        Quite a few entries, but i've defiantly done larger in the past.

        The error is in the attachement.

        Whats odd is that it appears to be saving correctly. (If you reload the page the save has worked).
          GEL STUDIOS
          MODX Professional | MODX Ambassador

          Website | Email | Twitter | Facebook
          • 42049 ☆ A M B ☆
          • 250 Posts
          OK I've found out what the problem is!!!

          The parent resource has a title of "Formula <sup>4</sup> Feet". When I load the resource the parent element shows as the HTML which I just mentioned. If i click save, I get the error.

          If however, I click to select the parent, and select it, the entry into the box simply says "Formula4 Feet" - If i click save, it WORKS, however, if i then reload the document, it goes back to the HTML version in the box. If you click save, it will error again.

          So it looks like on page load, the text for the parent container is not stripping the HTML. Thus on page save its throwing it all out.

          Have I found a bug? I think so...
            GEL STUDIOS
            MODX Professional | MODX Ambassador

            Website | Email | Twitter | Facebook
            • 42049 ☆ A M B ☆
            • 250 Posts
              GEL STUDIOS
              MODX Professional | MODX Ambassador

              Website | Email | Twitter | Facebook
              • 23018
              • 353 Posts
              Quote from: gelstudios at May 02, 2014, 02:31 AM
              Now logged on the repo

              https://github.com/modxcms/revolution/issues/11341

              Perhaps it's a communication problem, but I have the feeling something is really off with your system. If you want to, you can pm me login details and I'll have a look.

              Cheers, pepebe
                Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                • 42049 ☆ A M B ☆
                • 250 Posts
                Its a genuine bug. I'm spooled up a few VM's on different versions and its all the same smiley
                  GEL STUDIOS
                  MODX Professional | MODX Ambassador

                  Website | Email | Twitter | Facebook
                  • 23018
                  • 353 Posts
                  Please don't take this personal.

                  You should never, under no circumstance, use html inside a title field (on any other resource field except content,
                  rte textfields and perhaps introtext. This is what templates are for.

                  If you want to have a h1 headline, add

                  <h1>[[*pagetitle]]</h1>


                  to your template.

                  If you want to add

                  <sup>4</sup>


                  to your title, then you should solve this problem in your template too.

                  Separating

                  * content,
                  * markup and
                  * layout

                  from each other is a fundamental concept of modern webdesign.

                  If you are using a content management system like MODx, you

                  * store content in your resources,
                  * wrap it in meaningful markup in templates and template chunks,
                  * style it with css that targets your markup

                  If you want to learn more about this concept as well as about modern coding techniques, I can recommend to you a couple of resources.

                  Regards,

                  pepebe
                    Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                    • 42049 ☆ A M B ☆
                    • 250 Posts
                    Pepebe,

                    You really are telling me everything that I already use and adopt on a daily basis, however you are missing out one key point here - and thats the requirements of the client.

                    The client in question has spent hundreds of thousands of pounds on the development and trademarking of there products and brand, and as such, its a requirement that every mention of the super script 4 has to be in super script, with absolutely no exceptions.

                    Sure, I could build some super fancy output filter that scans for 4's and replaces them with wrapped superscript text, but that would be an extra cost to the client, extra development time, and it would only really be used a few times. So is it worth while going down that avenue? Is it of any benefit to the end client? No, absolutely not.

                    I appreciate you taking the time out to make a reply such as this, highlighting areas and good working methodology (I've actually contributed to some of these foundations which are adopted globally). However the resources you highlighted are meant as a good set of guidelines. Sometimes these guidelines don't meet the requirements, hence they sometimes need to be adjusted.

                    I am (I'm afraid) going to have to pick out a point you've made however:

                    You should never, under no circumstance, use html inside a title field (on any other resource field except content

                    I've never seen this documented anywhere? I've never seen that a "text" type input field or TV type doesn't' support this? The reason for this is the fundamental whole point of MODX, which is (and I quote from http://modx.com/get-modx/):

                    Total Creative Freedom

                    That means there is no right or wrong way to do anything in MODX at all.
                      GEL STUDIOS
                      MODX Professional | MODX Ambassador

                      Website | Email | Twitter | Facebook
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      Of course there are right and wrong (or just less-right) ways to do things in MODX.. even though there's creative freedom and there's dozens of valid approaches to do anything, there will always be things that may not work the way some creative person came up with simply because it was not developed in that way.

                      If anything though, a save action should not be breaking because of some HTML anywhere. I've not looked into the bug, but if it breaks because of user input that sounds like a potential XSS waiting to happen.

                      So yes, I agree this sounds like a bug and while putting html into a title may be "less-right", it should not cause breakage.
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.