We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33497
    • 30 Posts
    Quote from: Mark at Jul 11, 2007, 03:15 PM

    I would suggest trying a call like this for testing after ensuring all of the fields mentioned above are filled in:

    [!Ditto? &tpl=`DittoTemplate` &parents=`52` &language=`german` &summarize=`all` &extenders=`summary`!]
    

    In principle that makes no difference.

    Quote from: Mark at Jul 11, 2007, 03:15 PM

    @ZeTi: According to the debug output Ditto fetched all of the fields requested and set the placeholders with that info. It seems that your content / introtext, longtitle, and description fields are blank. Remember, the summary + link placeholders reference the content and introtext fields.

    I guess I got it.
    Tree structure:
    Folder "2000"
        Doc
        Doc
        Doc
        [...]
    Folder "2001"
        Doc
        Doc
        Doc
        [...]
    [...]
    


    So actually the content / introtext, longtitle and description fields _are_ empty, because Ditto is just processing the folders instead of the documents they contain.
    May it be possible that ditto ignores the multiLevel argument? I found nothing about it during some research.
      • 18397
      • 3,250 Posts
      "In principle that makes no difference."
      It does make a difference, since the parameters that were omitted from that call trigger Ditto’s prefetch.

      multiLevel no longer exists in Ditto 2.0 as it was only a toggle for the &depth parameter which tells Ditto how deep to retrieve documents. Now, if you set &depth it will handle everything for you.
        • 33497
        • 30 Posts
        Quote from: Mark at Jul 12, 2007, 01:46 AM

        "In principle that makes no difference."
        It does make a difference, since the parameters that were omitted from that call trigger Ditto’s prefetch.

        multiLevel no longer exists in Ditto 2.0 as it was only a toggle for the &depth parameter which tells Ditto how deep to retrieve documents. Now, if you set &depth it will handle everything for you.

        Yes I noticed that just a minute ago smiley
        With &depth=`2` now all entrys are displayed.
        It really should be mentioned here

        Btw the 0.9.6 update seems to corrupt umlauts, is that a known issue?

        edit:
        It does not work 100%: link
          • 10449
          • 956 Posts
          PHP sends UTF-8 headers, but you’re using ISO-8859-1 encoding in the HTML head. It should be either-or, not both wink
            • 33497
            • 30 Posts
            It seems like we are using two charsets.
            I set the encoding to iso-8859-1. Now I have to edit some documents titles to change them from utf-8 to iso.
            But ModX throws a PHP strstr() error, when I try to save an modified document:
            Warning: strtr() [function.strtr]: The second argument is not an array. in /homepages/33/d105031732/htdocs/manager/processors/save_content.processor.php on line 859
            

            Beside that sometime it throws another error "document X is allready using alias ’’" - but the alias is properly set on both documents.


            And the ditto call still does not work perfectly: link
            As you can see sometimes it still displays the folders instead of the documents inside them.

            edit:
            Another error together with the strstr() warning:
            Warning: Cannot modify header information - headers already sent by (output started at /homepages/33/d105031732/htdocs/manager/processors/save_content.processor.php:859) in /homepages/33/d105031732/htdocs/manager/processors/save_content.processor.php on line 563
            


            edit:

            When it throws the modify header warning it still saves the changes.
            But I am just able to save it when I delete the documents alias. After that ModX throws the header warning, saves my changes and sets the alias silently to 1 regardless if another document allrady has that alias or not.
            Whats going wrong here?

            edit³:

            I tricked ModX: Set encoding to UTF-8 (this way everything works as it should) replaced the umlauts with their html entities &*uml; and fixed all broken document alias.
            After that set encoding back to iso.
              • 10449
              • 956 Posts
              Well, if you set ISO-8859-1 in the manager config, you have to make sure the database tables are using this charset too.
              Chances are, it’s still set to utf-8 (default when installing).

              I’ve read that MODx 0.9.6 *does* have some problems with charsets other than UTF-8, but first of all make sure the mysql tables are in sync with the modx settings (and html template).
                • 33497
                • 30 Posts
                Besides that, any ideas why ditto still does not work completely?
                  • 18397
                  • 3,250 Posts
                  To remove the folders just add &hideFolders=`1`
                    • 33497
                    • 30 Posts
                    Thanks smiley