We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7825
    • 10 Posts
    Whenever you select text and open up the insert/edit link screen in TinyMCE, there's a fatal error displayed below the form
    Fatal error: Undefined class constant 'LOG_LEVEL_ERROR' in /usr/www/users/sfxscm/sfx/core/model/modx/error/moderrorhandler.class.php on line 111

    It doesn't seem to interfere with actually inserting a link at all, but I've had a query from the client about it and can't see why it's occuring

    In the MODX error log, it has the following error for the same time:
    [2014-09-02 14:52:12] (ERROR @ /connectors/resource/locks.php) Processor /usr/www/users/sfxscm/sfx/core/model/modx/processors/release.php does not exist; Array
    (
        [action] => release
    )


    This locks.php file seems to be a hang-over from an older version of MODX as the latest releases don't have it in the repo (The site has been steadily updated to newer releases)
    <?php
    require_once dirname(dirname(__FILE__)).'/index.php';
    $modx->request->handleRequest(array('location' => 'resource/locks'));


    Is there a way to stop this file from being referenced by the system or some other fix I can apply?
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      What version of MODX and TinyMCE are you using?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 7825
        • 10 Posts
        The site is running on version 2.3.1-pl now, but was originally installed on (i think) 2.2.7-pl

        TinyMCE is version 4.3.3-pl
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Can you try uploading the 2.3.1 files again, it almost sounds like one of the files didn't update properly.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 7825
            • 10 Posts
            Ok, so I've done a fresh install of 2.3.1 and installed the TinyMCE package on its own and the Fatal Error comes up when inserting a link, so it looks like there's something not set right in the package for TinyMCE
            No other errors in the log and the other files I mentioned are not there, so those must have been left over from a prior version

            Investigating the popup the error displays inside of, that's loaded from /assets/components/tinymce/jscripts/tiny_mce/plugins/modxlink/link.php?v=231pl

            The error appears at the end of the page that's loaded, but to check I dropped some simple tracers around the output, so that the file read
            echo 'a'; //tracing
            echo $o;
            echo 'b'; //tracing
            die();


            And the output reads
            </html>b<br />
            <b>Fatal error</b>:  Undefined class constant 'LOG_LEVEL_ERROR' in <b>/usr/www/users/sfxscm/new/core/model/modx/error/moderrorhandler.class.php</b> on line <b>111</b><br />
            


            So it seems like it's occurring as a result of the 'die()'