This is probably a really stupid question.. but can you only run the runSnippet once?
I'm working on a secure URL processor and have the following code:
$string = array( 'email' => $this->form['emailaddress'],
'code' => $_SESSION['CODE'],
'eventid' => $_SESSION['EVENTID'] );
$reversed = array_reverse( $string );
$data = array();
$data['viewonlinelink'] = $this->modx->runSnippet( 'urlConverter', array(
'action' => 'encrypt',
'string' => http_build_query( $string ) ) );
$data['confirmonline'] = $this->modx->runSnippet( 'urlConverter', array(
'action' => 'encrypt',
'string' => http_build_query( $reversed ) ) );
I make two calls to the same Snippet 'urlConverter' which fails.
If I comment out one or the other call to the snippet it works.. which leads me to assume I can only call that snippet once per page load. Is there anyway around that?