ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

{username} in path and redirect

June 25, 2011 5:02pm

Subscribe [3]
  • #1 / Jun 25, 2011 5:02pm

    Beyond Utility

    6 posts

    Hi -

    I have a URL I’m trying to form that looks like this:

    <a href="http://{path=somewhere/{username}}">Link</a>

    The URL that is outputted is this, which is broken because somewhere the closing bracket gets stripped from username:

    <a href="http://myurl.com/somewhere/{username}">http://myurl.com/somewhere/{username'}</a>

    If I hack it to this (missing closing single quote mark) all seems to be well:

    <a href="http://{path=somewhere/{username}}">Link</a>

    Returns as designed:

    <a href="http://myurl.com/somewhere/myusername">http://myurl.com/somewhere/myusername</a>

    It seems that this same issue is causing errors in redirects as well:

    {redirect='somewhere/{username}'}

    Redirects to here as a broken URL:

    <a href="http://myurl.com/somewhere/{username">http://myurl.com/somewhere/{username</a>


    Using:
    EE 2.2.0
    Solspace User 3.3.2

    Any help or suggestions would be appreciated.

    Thanks.

  • #2 / Jun 27, 2011 8:26am

    Sue Crocker

    26054 posts

    Hi, atomicglue.

    Welcome to the EE forums.

    It is indeed a bug, I can replicate the problem you’re seeing. It works just fine in EE2.1.3.

    I’ve reported this as a bug. In the meantime, please add the additional } until the bug in fixed. Thanks in advance for your patience.

  • #3 / Aug 21, 2012 1:56am

    Natetronn

    161 posts

    I found this bug in 2.5.2 (not sure it’s not just parse order, however)

    I got around this using Mo Variables and the {logged_in_username} variable.

    At least for the redirect. I didn’t test on path though, I bet it will work as well.

    Thanks to @Existencedesign for the tip.

  • #4 / Aug 22, 2012 12:59pm

    Dan Decker

    7338 posts

    Hey Nate!

    Thanks for the extra info and the bug reminder!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases