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

    I was trying to open a chunk I’d created that called the Login module’s update-profile snippet, when MODx effectively crashed. I can no longer access the Manager, and I get the following error when I try to visit www.url.com/manager

    Fatal error: Call to undefined function elements_modplugin_1() in /home/url/public_html/core/model/modx/modscript.class.php on line 48

    This is the line in question from that document:
    $this->_output= $scriptName($this->_properties);


    The context is:

    public function process($properties= null, $content= null) {
            parent :: process($properties, $content);
            if (!$this->_processed) {
                $scriptName= $this->getScriptName();
                if (!$this->_result= function_exists($scriptName)) {
                    $this->_result= $this->loadScript();
                }
                if ($this->_result) {
                    $this->xpdo->event->params= $this->_properties; /* store params inside event object */
                    ob_start();
                    $this->_output= $scriptName($this->_properties);
                    $this->_output= ob_get_contents() . $this->_output;
                    ob_end_clean();
                    if ($this->_output && is_string($this->_output)) {
                        /* collect element tags in the evaluated content and process them */
                        $maxIterations= intval($this->xpdo->getOption('parser_max_iterations',null,10));
                        $this->xpdo->parser->processElementTags($this->_tag, $this->_output, false, false, '[[', ']]', array(), $maxIterations);
                    }
                    $this->filterOutput();
                    unset ($this->xpdo->event->params);
                    $this->cache();
                }
            }
            $this->_processed= true;
    
            /* finally, return the processed element content */
            return $this->_output;
        }


    Please help! Thanks.
      • 1576
      • 24 Posts
      Can someone please respond to this? Now my site is down. What is going on here?
        • 22840
        • 1,572 Posts
        Can you reverse the edit’s you did to the chunk by accessing it through the database and see if you can then access the manager ?
          • 1576
          • 24 Posts
          I’ve gone in and deleted all the relevant chunks and resources. The site is still down. I’m going to have to restore from an earlier backup.

          I would really love to know why this happened, and how to prevent it from happening again.

          Anyone have any idea?

          Thanks.
            • 1576
            • 24 Posts
            Figured it out. Turns out my core files got corrupted somehow. Possible that a core directory or file was moved, breaking a reference somewhere.

            Upgrading to Revo 2.08 fixed the issue.

            It might be nice to have the Manager prompt users who are moving files/directories using the file manager, to avoid inadvertent catastrophes like this one:)