• Resolved user10522three

    (@zorrohere)


    Hi,

    This is the first time I came across this, when I select text and click on link button to add link it adds a ‘/wp-admin/_wp_link_placeholder’ as default link. I don’t remember ever seeing this until today. Any configuration to make default as blank textbox to enter link?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator bcworkz

    (@bcworkz)

    Hi zorrohere,

    I’m unable to replicate the behavior you describe. There could be a conflict in your theme or a plugin with the recent 4.8.1 release. Please verify you are using 4.8.1. Then try deactivating all plugins and switching to the twentyseventeen theme. If you still observe this behavior in this state, please describe exactly the steps taken to see this default link.

    I suspect it will no longer appear. Begin restoring your site’s original state, one module at a time. When the behavior returns, the last activated module would be the culprit. The responsible author should be notified. Also let us know here, we are keeping track of conflicts with 4.8.1 that folks observe.

    Once again, your help is appreciated!

    Thread Starter user10522three

    (@zorrohere)

    I was able to trace it,

    function format_tinyMCE ($init){
       $init['relative_urls'] = false;		
       $init['remove_script_host'] = true;
       $init['convert_urls'] = true;				
       return $init;
    }
    add_filter('tiny_mce_before_init', 'format_tinyMCE');

    If I set convert_urls to true it shows placeholder link. I don’t think it’s issue with 4.8.1 because I see same behaviour in 4.6.6(a local version which I haven’t updated). What I find strange is I never noticed it until today. Any way I can work around it? I don’t want to disable the setting because it keeps my blog urls absolute. One option I found is to enable ‘Alternate link dialogue’ in TinyMCE advanced plugin but I will still prefer to use default link dialogue.

    Thanks.

    Thread Starter user10522three

    (@zorrohere)

    Please ignore the thread for now, I think I was doing something completely wrong. I will post a reply once I figure it out.

    Thread Starter user10522three

    (@zorrohere)

    I tried all combinations,

    1. Setting all options to true makes urls relative and if you include page url into post url then it creates relative url inside that post which is not good.
    2. Setting convert_urls or remove_script_host to false stops converting urls completely.
    3. Setting convert_urls and remove_script_host to true and relative urls to false makes the urls absolute and converts all urls everytime you save but it inserts that weird placeholder url on when you try to add url.

    I think it qualifies as a bug?

    Moderator bcworkz

    (@bcworkz)

    Maybe, but it’s not a WP bug per se because you are altering the values it uses to initialize TinyMCE. The WP default is to utilize absolute URLs when you select a post from the content list. If that is your goal, why alter the settings at all?

    If you intend on seeking some sort of bug resolution, you will need to update everything on your site to the latest versions. It’s quite possible the behavior you wish to avoid no longer occurs. Or if it does, it may be you are just Doing it Wrong?. Perhaps the configuration where you are seeing ‘/wp-admin/_wp_link_placeholder’ requires you to also utilize another filter that replaces this string the the correct string. I don’t know this to be a fact, I’m only speculating.

    I suggest you update everything and remove the filter entirely. See if that works for you.

    Thread Starter user10522three

    (@zorrohere)

    Ya my WordPress is updated I just mentioned that it’s not related to 4.8.1 because I see same behavior in older version as well.

    Well, can you tell me how wordpress rewrites urls if I am using addon domain? At the time I used some plugin to move my site and it failed to rewrite urls on restoration. As a result I found the TinyMCE configuration to rewrite urls which worked for me except I never noticed this default link before. Now the plugin I am using is able to rewrite urls on restoration so I don’t have to worry about it, the only concern I have is addon domains, does wordpress successfully rewrites urls when website is being viewed from secondary domain or it still points to primary domain? I don’t have addon domain on my own site to test it.

    Moderator bcworkz

    (@bcworkz)

    WP does not rewrite add on domains by default, it uses whatever URL is specified in settings. However, this can easily be overridden in wp-config.php by defining constants. You can dynamically specify what value to use in the definition. See the dynamic example using $_SERVER[‘HTTP_HOST’] in the section on WP_HOME in the Codex. This can also be done for WP_SITEURL.

    Thread Starter user10522three

    (@zorrohere)

    I will look into it, thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Clicking on add link button adds default link ‘/wp-admin/_wp_link_placeholder’’ is closed to new replies.