We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14267
    • 113 Posts
    I have migrated some 0.9.2.1 sites to a new server, and am getting the following error:

    Fatal error: Cannot redeclare show() (previously declared in /home/andiandi/public_html/manager/includes/document.parser.class.inc.php(705) : eval()’d code:24) in /home/andiandi/public_html/manager/includes/document.parser.class.inc.php(705) : eval()’d code on line 37
    with the following snippet code:
    $resource = $modx->getDocumentChildren();
    print_r($resource);

    Server is linux/apache 1.3.37, php 5.1.2

    Any ideas?
      • 22303 MODX Staff
      • 10,725 Posts
      Can you paste the entire snippet code causing this, because the errors are occurring on lines 24 and 36 of the snippet being eval’d and you only pasted two lines of code...? It would have to be a snippet that declares a function named show()...
        • 14267
        • 113 Posts
        That’s why this is so mysterious--those are the only 2 lines of code. There is no show() function. It’s just a test snippet to most simply show the problem. But comes up showing errors for lines 24 and 37. It’s the only snippet called on the page.

          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: jlarson at Oct 28, 2006, 01:55 PM

          That’s why this is so mysterious--those are the only 2 lines of code. There is no show() function. It’s just a test snippet to most simply show the problem. But comes up showing errors for lines 24 and 37. It’s the only snippet called on the page.
          Plugins?
            • 14267
            • 113 Posts
            You know, I haven’t done any coding in like a year so am rusty. It was an embarrassingly simple issue and it popped into my head as I woke up this morning. The child documents were calling a snippet that contained the function ’show()’, so it was throwing an error. See this tip: http://modxcms.com/forums/index.php/topic,1595.0.html