Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kris Janssen 210 posts 569 karma points c-trib
    May 30, 2017 @ 02:37
    Kris Janssen
    0

    Inserting hyperlinks in RTE broken in 7.6.1

    Today, one of my users pointed out that inserting hyperlinks is not possible under 7.6.1 in RTE. Trying to do so results in following JS error:

      [Error] Error: undefined is not an object (evaluating 'n.href')
    mceInsertLink@http://www.mydomain.org/umbraco/lib/tinymce/tinymce.min.js?umb__rnd=7.6.1.1337484978:8:15519
    m@http://www.mydomain.org/umbraco/lib/tinymce/tinymce.min.js?umb__rnd=7.6.1.1337484978:8:10569
    insertLink@http://www.mydomain.org/umbraco/lib/tinymce/plugins/umbracolink/plugin.min.js:221:51
    callback@http://www.mydomain.org/umbraco/lib/tinymce/plugins/umbracolink/plugin.min.js:252:19
     submit@http://www.mydomain.org/umbraco/js/umbraco.services.js?cdv=1337484978:2069:44
    http://www.mydomain.org/umbraco/lib/angular/1.1.5/angular-mobile.js?cdv=1337484978:270:21
    $apply@http://www.mydomain.org/umbraco/lib/angular/1.1.5/angular.min.js?cdv=1337484978:92:384
    http://www.mydomain.org/umbraco/lib/angular/1.1.5/angular-mobile.js?cdv=1337484978:269:19
    dispatch@http://www.mydomain.org/umbraco/lib/jquery/jquery.min.js?cdv=1337484978:3:7542
    handle@http://www.mydomain.org/umbraco/lib/jquery/jquery.min.js?cdv=1337484978:3:5625
    (anonymous function) (angular.min.js:54:126)
    $apply (angular.min.js:92:399)
    (anonymous function) (angular-mobile.js:269)
    dispatch (jquery.min.js:3:7543)
    handle (jquery.min.js:3:5626)
    

    I believe this is caused by this commit:

    https://github.com/umbraco/Umbraco-CMS/commit/8e03a1ffca01083baae964fa9f2084d6b11569fc

    Here, a new function was added, createElemAttributes() but this function never returns the variable a which holds, among other things, the actual URL value...

    Therefore, following TinyMCE function gets passed null for the third parameter:

    execCommand: function(e, t, n, r) {
                return this.editorCommands.execCommand(e, t, n, r)
    
  • Kris Janssen 210 posts 569 karma points c-trib
    May 30, 2017 @ 03:57
    Kris Janssen
    100

    I can confirm that adding return a; at the end of createElemAttributes() restores normal ability to enter urls in RTE

    I have created a Pull Request accordingly.

    Additionally, Sebastiaan and some others pointed out that the tinyMCE plugin with issues (umbracolink) is probably redundant and can be disables. For more info see here.

Please Sign in or register to post replies

Write your reply to:

Draft