We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44140
    • 25 Posts
    Quote from: BobRay at Jun 19, 2016, 08:13 PM
    I assume that you've tried repairing all tables in the DB, then manually deleting the core/cache files?

    Assume nothing and you'll not be disappointed :-/

    It's been a long time since I had anything to do with MySQL, so I have a very vague recollection of what that might entail. I'll look it up.
      • 4172
      • 5,888 Posts
      Quote from: ecadre at Jun 20, 2016, 06:54 AM
      Quote from: Bruno17 at Jun 19, 2016, 01:17 PM
      Interesting issue. Never have heard or seen an issue like that and can't think, what could cause it.
      Any chance to get manager-access to an installation, where this happens?

      Yes, of course. There's nothing to lose.

      What would be the best way to arrange this? I could just make a new administrators account and PM the details.

      sure.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 44140
        • 25 Posts
        Quote from: ecadre at Jun 20, 2016, 06:57 AM
        Quote from: BobRay at Jun 19, 2016, 08:13 PM
        I assume that you've tried repairing all tables in the DB, then manually deleting the core/cache files?

        Assume nothing and you'll not be disappointed :-/

        It's been a long time since I had anything to do with MySQL, so I have a very vague recollection of what that might entail. I'll look it up.

        Just done it locally on my desktop, and mysqlcheck found nothing to repair. The issue remains.
        • discuss.answer
          • 4172
          • 5,888 Posts
          OK,
          I think, I have found, what it is within 5 minutes.
          It is the Markdown-Editor, which messes up your snippet-call.
          The call looks like that

          <p>[[!pdoResources? & amp;parents=`[[*id]]` & amp;where=`{& quot;template:=& quot;:& quot;44545& quot;}` & amp;tpl=`EventPost`]]</p>
          

          without spaces between & and amp, of course


          which can't work.

          Tested with deactivated Markdown-Editor and this snippet-call in your installation:

          [[!pdoResources? &parents=`[[*id]]` &where=`{"template:=":"45545"}` &tpl=`EventPost`]]


          And its working as it should work.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 44140
            • 25 Posts
            Quote from: Bruno17 at Jun 20, 2016, 09:18 AM
            OK,
            I think, I have found, what it is within 5 minutes.
            It is the Markdown-Editor, which messes up your snippet-call.
            The call looks like that

            <p>[[!pdoResources? & amp;parents=`[[*id]]` & amp;where=`{& quot;template:=& quot;:& quot;44545& quot;}` & amp;tpl=`EventPost`]]</p>
            

            without spaces between & and amp, of course


            which can't work.

            Tested with deactivated Markdown-Editor and this snippet-call in your installation:

            [[!pdoResources? &parents=`[[*id]]` &where=`{"template:=":"45545"}` &tpl=`EventPost`]]


            And its working as it should work.

            Thankyou very much ... but how embarrassing, for me that is (aaaarg!).

            I noticed exactly the same thing with Markdown Editor and could have sworn that I had checked it all out.

            It's curious that that call works on any level, which I suppose is what caused me to miss what was going on.

            Anyway, thanks, and I suppose I should be heading over to Markdown Editor on Github and doing a bug report.
              • 44140
              • 25 Posts
              ... and, we may have a solution inside Markdown Editor:

              It occurred to me that instead of double quotes:

              [[!pdoResources? &parents=`[[*id]]` &where=`{"template:=":"45545"}` &tpl=`EventPost`]]


              use single quotes, since they won't be changed into html codes:

              [[!pdoResources? &parents=`[[*id]]` &where=`{'template:=':45545}` &tpl=`EventPost`]]


              You have to leave the quotes off the template number called, but that is how they show it in the getResources documentation anyway, though I haven't found an official example in the pdotools documentation.

              EDITED TO ADD:

              No, not a sustainable solution. There are too many times that settings in getResources or pdoResources need to use double quotes such as &sortby. [ed. note: ecadre last edited this post 7 years, 10 months ago.]
                • 4172
                • 5,888 Posts
                The solution is: Don't put any snippet-tags into a richtext- or markdown-editor.

                Try to create your templates in a way, where you can put snippet-calls outside of the content.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 44140
                  • 25 Posts
                  Quote from: Bruno17 at Jun 20, 2016, 02:10 PM
                  The solution is: Don't put any snippet-tags into a richtext- or markdown-editor.

                  Try to create your templates in a way, where you can put snippet-calls outside of the content.

                  Yeah, I know that, but it is a bit of a faff.

                  Personally, I have an aversion to so-called rich text editors in CMSs or browsers. They usually produce bad markup (or markup not to my taste) that is difficult to control. I also don't like all the levels of abstraction.

                  I live most of the time in GNU Emacs (email, IRC, org-mode etc etc), which I have adapted over many years to my ways, which probably indicates my preferences in terms of controlling text and text editors.

                  This site is not going to be used by me, and I of course recognise that other people do not use computers in the way that I do. In this case they will require some sort of editor interface that they can easily understand.

                  When I saw the Markdown Editor I was quite pleased. Markdown is a good, simple way of marking up text (which also doesn't encourage people to start doing stupid things), and the addition of a way to enter images and use oembed with a simple point and click system is good for the end user.

                  So, I suppose I'll just abstract all the code and snippets into chunks or whatever. Easy enough I suppose, but it would have been nice if the Markdown Editor website mentioned this sort of thing in the first place ... they seem to go the other way and claim "Parsing MODX tag in live preview". Ah well.

                  Many thanks for pinning down what the trouble was, I'm still rather shocked that I failed to notice it myself. [ed. note: ecadre last edited this post 7 years, 10 months ago.]