WordPress.org

Ready to get started?Download WordPress

Forums

WP External Links (nofollow new window seo)
1.5 breaks links in Javaskript (9 posts)

  1. dhoffmann
    Member
    Posted 6 months ago #

    Hi, thanks for this plugin. I used it in several of my sites and it always worked fine. Now after the last update it breaks links in Java-Skripts.
    After deactivating it works fine. Any idea?
    Best wishes
    Daniel

    http://wordpress.org/plugins/wp-external-links/

  2. freelancephp
    Member
    Plugin Author

    Posted 6 months ago #

    Could you check if the option "Replacing with <\/a> in JavaScript code" (under "Extra Settings") is enabled?

  3. dhoffmann
    Member
    Posted 6 months ago #

    yes, I reactivate the plugin now and you can see the error here:
    http://celtic-rock-radio.de (scroll down in the green area).

    The problem occurs since 1.5, Before it worked and when I deactivate it works too.

  4. dhoffmann
    Member
    Posted 6 months ago #

    is there is a missing ">" anywhere?

  5. freelancephp
    Member
    Plugin Author

    Posted 6 months ago #

    It's technical, but the reason was caused by the new parse attributes function. This was nescessary to solve some bugs. Officially attribute values cannot contain < or >.

    In your case you could create a workaround by adding this function to the functions.php file in your theme folder:

    function external_link_js_template_fix($created_link, $original_link, $label, $attrs = array()) {
        if (isset($attrs['href']) && strpos($attrs['href'], '<%= encodeURIComponent(song.artist.name) %') !== false) {
            $created_link = str_replace('<%= encodeURIComponent(song.artist.name) %', '<%= encodeURIComponent(song.artist.name) %>', $created_link);
        }
    
        return $created_link;
    }
    add_filter('wpel_external_link', 'external_link_js_template_fix', 10, 4);
  6. dhoffmann
    Member
    Posted 6 months ago #

    Hi, thanks for help, but it broke another plugin with social icons in my sidebar, even if I didn't want it in widgets. I'll turn it off in this site. Daniel

  7. freelancephp
    Member
    Plugin Author

    Posted 6 months ago #

    Did the additional code (function.php) broke the social sidebar?

    What do you mean by "broke"?

  8. dhoffmann
    Member
    Posted 5 months ago #

    Hi, formatting was not as expected. It was not the additional code.

    Another problem I ran into was, that I use mycred for my community. Using "links" didn't work when this plugin was activated.
    http://mycred.me

    I want to point out, that my site is very special (lots of plugins) and I have your plugin running on many other sites without any probelm! Thanks a lot for this!

    Daniel

  9. freelancephp
    Member
    Plugin Author

    Posted 3 months ago #

    Does it work well when you deactivate the other plugin?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.