We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    eval()’d code = possible snippet problem. Try disabling snippets one by one by changing "[[" to "[", etc.

    Andy
      • 28346
      • 30 Posts
      No luck... I did as you suggested to every snippet I’m usng in my template and still get the same error. Would I need to do the same for the chunk & TV calls as well?
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: StainlessSteelRat at Sep 14, 2006, 07:40 PM

        No luck... I did as you suggested to every snippet I’m usng in my template and still get the same error. Would I need to do the same for the chunk & TV calls as well?
        No, but if you have chunks or TV’s that contain any calls to other snippets, then you need to get those snippet tags as well. It’s definitely a snippet being executed and causing the error on line 372 of the code.
          • 28346
          • 30 Posts
          Ahhh.. of course... didn’t think of that! Duh. embarrassed I’ll check it out. Thanks.
            • 20394
            • 134 Posts
            I try DocManager->Sort Menu Items on another computer and also get :
            jsPath = $jsPath; } function addList($list, $input, $tag = ’li’, $additionalOptions = ’’) { if ($additionalOptions != ’’) $additionalOptions = ’,’.$additionalOptions; $this->lists[] = array("list" => $list, "input" => $input, "tag" => $tag, "additionalOptions" => $additionalOptions); } function printHiddenInputs() { $inputType = ($this->debug) ? ’text’ : ’hidden’; foreach($this->lists as $list) { if ($this->debug) echo ’
            ’.$list[’input’].’: ’; $output.=""; } if ($this->debug) $output.= ’
            ’; return $output; } function printForm($action, $method = ’POST’, $submitText = ’Submit’, $submitClass = ’’,$formName = ’sortableListForm’) { $output.="
            "; $output.= $this->printHiddenInputs(); $output.= ""; if ($this->debug) { $output.= "
            "; } $output.= "
            "; return $output; } function printTopJS() { $output.=" "; return $output; } function printBottomJs() { $output=’ ’; return $output; } function getOrderArray($input,$listname,$itemKeyName = ’element’,$orderKeyName = ’order’) { parse_str($input,$inputArray); $inputArray = $inputArray[$listname]; $orderArray = array(); for($i=0;$i $inputArray[$i], $orderKeyName => $i +1); } return $orderArray; } }
            Fatal error: Class ’SLLists’ not found in C:\wamp\www\rev1392\root\assets\modules\docmanager\includes\process.inc.php on line 362

            My configuration : XP+WAMP (PHP 5.1.2)
              • 10487 MODX Staff
              • 1,535 Posts
              Hi mrcou, I’ve got the same WAMP configuration on my Win machine at home so I’ll have a look when I leave off work and see if I can figure out what the problem is.

              Thanks,
              Garry
                Garry Nutting
                Senior Developer
                MODX, LLC

                Email: [email protected]
                Twitter: @garryn
                Web: modx.com
                • 16732
                • 592 Posts
                @mrcou : I have the same error with WAMP 1.6.1(PHP 5.1.2) WITH the PHP5<->PHP4 plugin activated (i.e when PHP4 is activated). But when I switch to PHP5 -> no more error
                  • 727
                  • 502 Posts
                  Quote from: OpenGeek at Sep 14, 2006, 07:53 PM

                  Quote from: StainlessSteelRat at Sep 14, 2006, 07:40 PM

                  No luck... I did as you suggested to every snippet I’m usng in my template and still get the same error. Would I need to do the same for the chunk & TV calls as well?
                  No, but if you have chunks or TV’s that contain any calls to other snippets, then you need to get those snippet tags as well. It’s definitely a snippet being executed and causing the error on line 372 of the code.

                  Would it be possible to show the name of the snippet that is being evaled when this error is generated?

                  Andy
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: ajayre at Sep 15, 2006, 12:02 PM

                    Would it be possible to show the name of the snippet that is being evaled when this error is generated?
                    Not easily or without adding code to the document.parser file at the moment. Once the eval() is gone in a future release (not 0.9.5), it will be much easier to debug snippets in general, and we’ll make sure that detailed information about what snippet is executing is revealed on error as appropriate.

                    Quote from: StainlessSteelRat at Sep 14, 2006, 01:16 PM

                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource:
                    « PHP Parse Error »
                     
                    PHP error debug
                      Error: 	array_values() [function.array-values]: The argument should be an array	 
                      Error type/ Nr.: 	Warning - 2	 
                      File: 	D:\www\webroot\baycollege.dev\manager\includes\document.parser.class.inc.php(724) : eval()'d code	 
                      Line: 	372
                    


                    Anyone else see this?
                    Check out this thread; seems to be the same error and appears to be Ditto at the root of the problem... http://modxcms.com/forums/index.php/topic,7183.msg50447.html#msg50447
                      • 28346
                      • 30 Posts
                      It was Ditto this time as well. I renamed the Ditto snippet as a quick test and the page came right up without the eval() error.

                      This discussion is closed to further replies. Keep calm and carry on.