We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38723
    • 165 Posts
    I'm getting this error CONSTANTLY on a site which uses tagLister:

    [2013-08-29 13:11:29] (ERROR @ /index.php) `` is not a valid integer and may not be passed to makeUrl()


    tagLister uses the following chunk to output the tags:

    <span data-filter=".[[+tag:replace=` ==-`]]">[[+tag:strtolower]]</span>


    At no point am I trying to make a URL! Can this be stopped, it's unecessarilly running something it doesn't need to and the site amassed a 160MB error log in just a few weeks, nearly completely filled with this error.

    I checked the documentation, or should I say I tried but there really isn't any detail on there at all: http://rtfm.modx.com/extras/revo/taglister/taglister.taglister

    So, I decided to have a look through the snippet and found a multitude of script options - why aren't these documented???

    $tpl = $modx->getOption('tpl',$scriptProperties,'tag');
    $tv = $modx->getOption('tv',$scriptProperties,'tags');
    $tvDelimiter = $modx->getOption('tvDelimiter',$scriptProperties,',');
    $target = $modx->getOption('target',$scriptProperties,1);
    $tagVar = $modx->getOption('tagVar',$scriptProperties,'tag');
    $tagKeyVar = $modx->getOption('tagKeyVar',$scriptProperties,'key');
    $limit = $modx->getOption('limit',$scriptProperties,10);
    $sortBy = strtolower($modx->getOption('sortBy',$scriptProperties,'count'));
    $sortDir = strtoupper($modx->getOption('sortDir',$scriptProperties,'ASC'));
    $cls = $modx->getOption('cls',$scriptProperties,'');
    $altCls = $modx->getOption('altCls',$scriptProperties,'');
    $firstCls = $modx->getOption('firstCls',$scriptProperties,'');
    $lastCls = $modx->getOption('lastCls',$scriptProperties,'');
    $activeCls = $modx->getOption('activeCls',$scriptProperties,'');
    $activeTag = isset($_REQUEST[$tagVar]) ? $modx->stripTags(urldecode($_REQUEST[$tagVar])) : '';
    $activeKey = isset($_REQUEST[$tagKeyVar]) ? $modx->stripTags(urldecode($_REQUEST[$tagKeyVar])) : '';
    $all = $modx->getOption('all',$scriptProperties,false);
    $toLower = $modx->getOption('toLower',$scriptProperties,false);
    $weights = $modx->getOption('weights',$scriptProperties,0);
    $weightCls = $modx->getOption('weightCls',$scriptProperties,'');
    $useTagFurl = $modx->getOption('useTagFurl',$scriptProperties,false);
    $furlKey = $modx->getOption('furlKey',$scriptProperties,'tags');
    


    Still didn't help with this problem, I can't see anything obvious there to stop the URL generation. I can only see the following in the snippet that refers to makeURL:

    'url' => $useTagFurl ? $modx->makeUrl($target).$tv.'/' : $modx->makeUrl($target,'',array(
                $tagVar => '',
                $tagKeyVar => $tv,
            )),
    


    Can anyone help with this?

    This question has been answered by pdincubus. See the first response.

    • discuss.answer
      • 38723
      • 165 Posts
      EDIT: I must have rubber ducked this, because *even though my tags don't link anywhere*, you still HAVE to provide &target other wise the error will persist. Would be helpful if the documentation said which options were required!
        • 38878
        • 255 Posts
        Thanks for posting the resolution. Rubber duckie or not I had the same issue.;)

        Quote from: pdincubus at Aug 29, 2013, 05:41 PM
        EDIT: I must have rubber ducked this, because *even though my tags don't link anywhere*, you still HAVE to provide &target other wise the error will persist. Would be helpful if the documentation said which options were required!
          • 17667
          • 108 Posts
          Thanks for this answer, that error was driving me crazy! Adding &target totally resolved it.
            • 42562
            • 1,145 Posts
            This absolutely insulted my intelligence; first I punched my neighbour, then my work laptop.

            I can't imagine how much faster the script would be without this stupid oversight.

            Anyway, here is for posterity

            [[tagLister? 
            &tv=`myTV` 
            &tvDelimiter=`,` 
            &sortBy=`tag` 
            &sortDir=`ASC` 
            &parents=`[[+id]]` 
            &limit=`100` 
            &tpl=`twExistingTagsSelectOptionsTpl` 
            &target=`[[+id]]` //&target=`` or &target=`0` will cause plentiful errors
            ]] 

            This quack solution must be expensive on the server ... who knows? [ed. note: donshakespeare last edited this post 8 years, 2 months ago.]
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.