We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8499
    • 19 Posts
    Hello there, I’m getting this error (see attached screengrab) every time I try to add a link on the tinyMCE with my Revo install. I think there is a problem with the link.php in this path:
    http://www.mysite.com/assets/components/tinymce/jscripts/tiny_mce/plugins/modxlink/link.php?v=204pl2


    this is the content of that file (I’m not a PHP expert at all...)


    <?php
    /**
     * Launch the modx-customized link dialog
     */
    require_once dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))))).'/config.core.php';
    require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
    require_once MODX_CONNECTORS_PATH.'index.php';
    
    $tinyCorePath = $modx->getOption('tiny.core_path',null,$modx->getOption('core_path').'components/tinymce/');
    require_once $tinyCorePath.'tinymce.class.php';
    
    
    $o = file_get_contents(dirname(__FILE__).'link.htm');
    
    $managerUrl = $modx->getOption('manager_url',null,MODX_MANAGER_URL);
    $placeholders = array(
        'manager_url' => $managerUrl,
        'ext_url' => $managerUrl.'assets/ext3/',
        'modext_url' => $managerUrl.'assets/modext/',
        'connectors_url' => $modx->getOption('connectors_url',null,MODX_CONNECTORS_URL),
        'css_url' => $managerUrl.'templates/'.$modx->getOption('manager_theme',null,'default').'/css/',
    );
    
    $chunk = $modx->newObject('modChunk');
    $chunk->setContent($o);
    $o = $chunk->process($placeholders);
    
    
    echo $o;
    die();



    Could someone please help me with this? the client is a bit frustrated (obviously!) since he needs this working asap.

    thanks a lot to all of you for this.

    Edu.

      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Just heard about a similar problem, also 2.0.7 traditional.


      Right clicking the selected text and choosing to make a link from there does work, as that is a different tinymce plugin (which lacks the resources list)...


      TinyMCE 4.1.2

      Related:
      http://modxcms.com/forums/index.php/topic,56158.0.html
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.