Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Fixes logout URL#5311

Merged
itsjoekent merged 3 commits intoDoSomethingArchive:globalfrom
itsjoekent:5283
Sep 29, 2015
Merged

Fixes logout URL#5311
itsjoekent merged 3 commits intoDoSomethingArchive:globalfrom
itsjoekent:5283

Conversation

@itsjoekent
Copy link
Contributor

What's this PR do?

Fixes the logout URL (on path prefixes it fails)

How should this be manually tested?

Go to any page, including path prefixed ones, and try logging out

Any background context you want to provide?

Issue was the user/logout was being appended to the path prefix, so you'd get a url like ususer/logout. I tried initially just adding a slash to /user/logout, which fixes it on path prefixes. However on other pages this URL breaks. The solution was to just create the URL from scratch and guarantee it's the same URL for everyone, every time on every page.

What are the relevant tickets?

Fixes #5283

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be using l() here instead of printing out each part of the url.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I never heard of that function, looks like what we need

@sergiitk
Copy link
Contributor

Yes, l() function needed. Also applies for login link.

@itsjoekent
Copy link
Contributor Author

@sergii-tkachenko done and done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure, will it generate id="link--logout", as it used to be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh forgot about that one. It doesnt apply any styles, what do we use it for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ask @DFurnes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used as a hook for CasperJS tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergiitk
Copy link
Contributor

Let's bring back the ids and we're good to go 👍

itsjoekent pushed a commit that referenced this pull request Sep 29, 2015
@itsjoekent itsjoekent merged commit c9a5706 into DoSomethingArchive:global Sep 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants