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

    I try to run the getResources snippet (1.3.1) with tvFilters in modx Revo (latest PL)
    $output = $modx->runSnippet('getResources',array('parents'=>'61'
    ,'tpl'=>'adressegetresources',
    'includeTVs'=>'1',
    'processTVs'=>'1',
    'limit'=>'100'
    'tvFilters'=>"Vorname==Stefanie"
    ));
    echo $output;

    But I get an error:
     syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in mypath/core/cache/includes/elements/modsnippet/61.include.cache.php on line 12

    'tvFilters'=>"Vorname==Stefanie%"
    doesn´t work either.
    The error doesn´t occur when I comment out the tvFilters line. What am I doing wrong?
      • 349
      • 76 Posts
      Oh my.
      I forgot a comma after
      'limit'=>'100'


      Sometimes you just have to look at your code the next day and see your mistakes directly.