We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4628
    • 58 Posts
    Hi!

    I want to create a blog with the snippets Ditto and tagLinks. I made everything like it is described in the Tagged blogging Wiki: http://wiki.modxcms.com/index.php/Tagged_blogging_with_Ditto

    Unfortunately I got following error message on the website:

    MODx Parse Error

    MODx encountered the following error while attempting to parse the requested resource:

    PHP Parse Error

    PHP error debug
    Error: implode() [function.implode]: Invalid arguments passed
    Error type/ Nr.: Warning - 2
    File: /my-path/manager/includes/document.parser.class.inc.php(770) : eval()’d code
    Line: 98

    I use modx 1.0.2 and the latest version of tagLinks.

    Structure of the website:

    Homepage
    News
    Container 1
    article
    article
    ...
    Container 2
    article
    article
    Container 3
    article
    article
    ...

    Here’re the Ditto calls:

    News:

    [!Ditto? &startID=`5` &tpl=`dittoTpl` &summarize=`6` &tplTrunc=`next` &dateSource=`pub_date` &phx=`1` !]

    Container:

    [!Ditto? &startID=`5` &tpl=`dittoTpl` &tagData=`tvtags` &tagDelimiter=`|` &tagMode=`onlyTags` &tags=`example`!]

    &tpl:

    <p class="datum">[+pub_date:date=`%d.%m.%Y`+]</p>
    <h2><a href="[~[+id+]~]">[+longtitle+]</a></h2>
    <h3><a href="[~[+id+]~]">[[tagLinks? &id=`[+id+]` &tv=`tags` &separator=`|` &fap=`1` &path=`news` &label=`Kategorien: ` &style=``]]</a></h3>
    [+summary+] [+link+]

    Thanks

    Carlina
      • 4628
      • 58 Posts
      Ok, I don’t know what kind of problem this is. But obviously the cause is not the tagLink snippet. I commented out all the ditto and tagLinks snippets - and have still the same error messege but only on the news site. The problem only appears immediately after installing the tagLinks-Snippet ...
        • 16278
        • 928 Posts
        I’m not familiar with tagLinks, but if you’re following the Wiki article, the delimiter in the second Ditto call should be a comma, not a pipe:
        &tagDelimiter=`,` 
        . Note also you no longer need to prefix template variable names with "tv" in Ditto 2.1 calls, so you can use &tagData=`tags` instead of &tagData=`tvtags`. (You might want to use a different name for the TV to avoid confusion with the &tags parameter).
        wink KP
          • 4628
          • 58 Posts
          Thanks for your answer. It doesn’t matter what sign is used as the delimiter between the tags. The tv name in the ditto call is only a dummy name. In the original ditto call I use a german word without tv ;-)

          Correction: the name of &tagData has to begin with "tv" (in contrast to the value of &tpl). I surely use correct value names (&tagData with a tv and &tpl without tv). The problem must have another reason ...
            • 4628
            • 58 Posts
            By the way, this is a part of the code of document.parser.class.inc.php. What is the problem in line 98?

            elseif ($type == ’REDIRECT_HEADER’ || empty ($type)) {
            // check if url has /$base_url
            global $base_url, $site_url;
            if (substr($url, 0, strlen($base_url)) == $base_url) {
            // append $site_url to make it work with Location:
            $url= $site_url . substr($url, strlen($base_url));
            }
            if (strpos($url, "\n") === false) {
            $header= ’Location: ’ . $url;
            LINE 98: } else {
            $this->messageQuit(’No newline allowed in redirect url.’);
            }
            }
            if ($responseCode && (strpos($responseCode, ’30’) !== false)) {
            header($responseCode);
            }
            header($header);
            exit();
            }
            }
              • 20413
              • 2,877 Posts
              What version of Ditto are you using? Ditto 2 has tagging
              extender built in with placeholders for tags and tagLinks
              http://ditto.modxcms.com
                @hawproductions | http://mrhaw.com/

                Infograph: MODX Advanced Install in 7 steps:
                http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                • 4628
                • 58 Posts
                I use the Ditto version that comes with modx 1.0.2. It’s a new project.

                ... o.k. that’s it: I installed the tagLink snippet. Now I have deleted it and the News site is there again ... but I can see the Ditto call, too >:(! I want to see the articles not the Ditto call ...
                  • 20413
                  • 2,877 Posts
                  Did you check out http://www.vimeo.com/929777
                    @hawproductions | http://mrhaw.com/

                    Infograph: MODX Advanced Install in 7 steps:
                    http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                    Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                    http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                    • 4628
                    • 58 Posts
                    Yes, I saw the video and red everything I could find about tagged blogging with modx. I’ve one question yet: is it possible to use the snippet "tagLinks" with modx 1.0.2? The download page says it’s for the versions 0.9.5 and 0.9.6. That’s probably the reason why I got the php error page. Now I use the [+tagLinks+] placeholder in my template and it works wink. But the tagLinks snippet offers more options. Is it possible to use it with modx 1.0.2?

                      • 20413
                      • 2,877 Posts
                        @hawproductions | http://mrhaw.com/

                        Infograph: MODX Advanced Install in 7 steps:
                        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower