• Resolved Ashish

    (@ashishpatel1992)


    Hello,
    I am facing strange issue with URL’s
    The URL in href looks like this
    <a href="\" "="" http:="" mydomain.com="" company="" vilmik="" \="">
    Not sure what is the problem.
    Earlier this was working maybe 1 month ago, I noticed this issue today.
    I had also tried bulk update all URL with username after update Still no luck.

    https://wordpress.org/plugins/edit-author-slug/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Brandon Allen

    (@thebrandonallen)

    It looks like you’re customizing author URLs beyond what Edit Author Slug does. The only time Edit Author Slug touches author URLs is when role slugs are being used, and even then, it’s a simple find and replace for the string %ba_eas_author_role%. It’s not impossible that there is a bug, but I’ve got a pretty robust test suite at this point, so I would say it’s not likely. What theme are you using? Are you using any plugins, besides Edit Author Slug, that pertains to users? Do you have any custom code in your theme’s functions.php? Do you have a link where I can see it in action?

    Thread Starter Ashish

    (@ashishpatel1992)

    Hello,
    I am using simplux theme by appthemes.com
    You can see the website link at http://goo.gl/XMznpz
    Scroll down to “Publié par : Recrutement”
    If you right click and see the a href tag you will see the issue.

    Also I have not used anyother Author plugin.

    I have a question does this plugin writes the new slug in database?
    If not then I can try uninstalling the plugin to see if link issue is still there or not.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    I can’t take a look at the theme, because it’s a premium theme.

    I have a question does this plugin writes the new slug in database?

    Technically, all of the slugs are saved to the database. However, author slugs are the only ones that will stick around after you disable the plugin. If you are using a custom author base other than ‘author’, it will be reset when you disable the plugin. Just try disabling the plugin.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    Were you able to test with the plugin disabled? Did that change anything?

    Thread Starter Ashish

    (@ashishpatel1992)

    Hello,
    Sorry for the delay I was on vacation. Ok I have tried deactivating and even deleting the plugin which even didnt help.
    I see the same url structure. (may be the plugin saved the new slug to database) Is there anyway to fix this?

    Plugin Author Brandon Allen

    (@thebrandonallen)

    The plugin doesn’t save full author URLs to the database. The issue you’re seeing is a malformed anchor (<a>) tag. The reason I had you deactivate Edit Author Slug was to rule out as the problem. My guess is it is an issue with your theme.

    Thread Starter Ashish

    (@ashishpatel1992)

    Hello Again,
    Thanks for the information.
    Here is the reference code inside theme:

    $format = __('<a href="%s">%s</a>', APP_TD);
    
    	$author = get_user_by('id', $post->post_author);
    	if ( $author && $link = get_author_posts_url( $author->ID, $author->user_nicename ) )
    		echo sprintf( $format, $link, $author->display_name );

    I have the same theme demo in other site here http://goo.gl/O0Mrlj
    In that I have never installed Edit Author Slug Plugin and URL is working good.

    Let me know if the above code helps you to diagnose the problem.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    To what did you set the author slug for that user?
    What version of the plugin are you using?

    Could you try changing
    echo sprintf( $format, $link, $author->display_name );
    to
    echo esc_attr( sprintf( $format, $link, $author->display_name ) );

    This will help me see what’s being output without, hopefully, breaking the anchor tag.

    Thread Starter Ashish

    (@ashishpatel1992)

    Hello,
    I am unable to post here maybe due to slashes and quotes in code
    Here is the link for my response:
    http://pastebin.com/HnLvLxhQ

    Thread Starter Ashish

    (@ashishpatel1992)

    Hello Again,
    The problem is resolved. You were right your plugin wasn’t the issue. It was the issue from the Translated po file.
    Thanks a lot for your time and efforts. 5 Star to your plugin for your valuable support.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    Glad you got it figured out, and thank you for your nice review!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Slug URL is generating wrong’ is closed to new replies.