We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11975
    • 2,542 Posts
    me again  grin

    I’m testing Ditto 1.1 on a local server and to my hoster.
    Locally, everything is fine but on the remote server I’ve got this error message

    « MODx Parse Error »

    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Lost connection to MySQL server during query »
          SQL: SELECT DISTINCT sc.createdon,sc.id FROM `mabase`.modx_site_content sc LEFT JOIN `mabase`.modx_document_groups dg on dg.document = sc.id WHERE (sc.parent IN (11552,11800,11922,11993,12066,12019,11846,12423,12347,11753,2,
    12499,12500,12809,12910,13011,13162,13313,13464,13615,13617,13919,13920,13921) AND sc.published=1 AND sc.deleted=0 AND isfolder = 0) AND (sc.privateweb=0) ORDER BY sc.createdon DES
    I’ve tried on the same server the query through phpmyadmin and it works fine.
    Here is my hosting configuration:

    PHP Version 4.4.4
    Mysql : 5.0.18

    the main difference between the both is:
    mysql.allow_persistent Off Off

    :-)

    IF needed I can PM log/pwd
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
      • 18397
      • 3,250 Posts
      MARKSVIRTUALDESK Reply #12, 20 years ago
      You can use total to limit the # of results after filtering. Limit is there simply because it adds LIMIT ## to the SQL call to set a fixed limit on the # of documents that can be culled.

      All of the DB calls in Ditto are made using API functions so I have no idea why it would loose the connection.
        • 18397
        • 3,250 Posts
        MARKSVIRTUALDESK Reply #13, 20 years ago
        Quote from: xeres at Sep 04, 2006, 01:02 AM

        What about replace create date by pub date for sortBy option?

        Yes, that now happens again. smiley

        Quote from: heliotrope at Sep 04, 2006, 10:04 AM

        I will let you know if I’ve been able to make it wok with Ditto.

        It took alot longer than I though but here is a simple version attached. You have the following variables available in the snippet call:

        &pageCount = should be the same value as totalpages (you can’t use the placeholder as a parameter due to parser issues)

        &summarize = set it same as Ditto

        &setCount = number of sets to show, default is 5

        Place the contents of the included zip in assets/snippets/smoothpages and make sure the document you are calling it on is cached and the calls are uncached. Then once the page is cached, $modx->regClientStartupScript will insert the needed heading calls into the head tag.
          • 11975
          • 2,542 Posts
          Did I ever say YOU’RE GREAT !!!!! grin

          Thx for all the good stuff you share.

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 18397
            • 3,250 Posts
            MARKSVIRTUALDESK Reply #15, 20 years ago
            Thank you! Thank you! [Bows]
              • 11975
              • 2,542 Posts
              Just one thing mark.
              I had to change one line in the script to avoid conflict with existing function builURL

              if(!function_exists("buildURL")){
              ....
              }


              till now I could not get it work but It’s late here and will give it a try tomorrow.

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 18397
                • 3,250 Posts
                MARKSVIRTUALDESK Reply #17, 20 years ago
                In which script?
                  • 11975
                  • 2,542 Posts
                  In "smoothpages.snippet.inc.php" around line 28

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Quick question for ya Mark: did you test the snippet with stop on notice set to true to catch all the little PHP warnings and whatnot?
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 17883
                      • 1,039 Posts
                      Hi Mark,

                      I think the "read more"-link isn´t rendered. Output of debugger:

                      ....
                      [+hidemenu+] => 1
                      [+link+] =>
                      [+date+] => 23.08.2006
                      ....

                      Tried to call with $truncText=`something` and without custom text.


                      This discussion is closed to further replies. Keep calm and carry on.