Skip to content

Redirects should have a linked body message#823

Merged
philwareham merged 1 commit intotextpattern:devfrom
da2x:bugfix_redirect_body
Oct 27, 2016
Merged

Redirects should have a linked body message#823
philwareham merged 1 commit intotextpattern:devfrom
da2x:bugfix_redirect_body

Conversation

@da2x
Copy link
Copy Markdown
Contributor

@da2x da2x commented Oct 26, 2016

This is dead code, as far as I can tell; but fixing it anyway. Not all clients follow redirects automatically.

Redirect pages generated by all major web servers include a body message for redirects.

Users see informational page instead of blank page when redirect fails because of caching, network issues, tweaked browsers, accessibility settings, misuse of curl, etc. etc.

@bloatware
Copy link
Copy Markdown
Member

bloatware commented Oct 27, 2016

@Aeyoun good idea, and I would merge it if we had localized moved_to strings. Or output just the link?

edit: maybe permanent_link (Permanent link to this article) could do?

@da2x
Copy link
Copy Markdown
Contributor Author

da2x commented Oct 27, 2016

I thought about it, bu decided aginst it. It’s a single lone sentence on an empty document with one link that containes the word “here”. I don’t think there’ll be much of a lingual barrier if anyone stumble across this. I see “Click here” is used on links even on Chinese language webpages. No one should see this message unless there is a network problem, special needs (accessibility), or someone using curl without following redirects.

I could switch it to just a link, but the text with link is probably a better user experience than just a linked URL — even if you don’t fully understand the language.

@philwareham
Copy link
Copy Markdown
Member

This is no different than how the systems states "Database unavailable' only in English.

@bloatware
Copy link
Copy Markdown
Member

@philwareham I leave it with you to decide if it's ok UX-wise, but think that a localized Permanent link to this article string could be an option. I would see this message, since redirects are disabled in my daily browser.

@philwareham
Copy link
Copy Markdown
Member

I can create a new translation string moved_to as suggested, how about that?

@bloatware
Copy link
Copy Markdown
Member

Nope for me, new strings are rarely translated nowadays.

@philwareham
Copy link
Copy Markdown
Member

Well, I don't agree with that, we have a fairly healthy level of translation activity.

I'm also building a translations page into the new Textpattern official site, which encourages people to use our Crowdin project.

@bloatware
Copy link
Copy Markdown
Member

Ah, sorry, nice to hear it! But I'd prefer to keep the number of strings as low as possible. Merge it as is, maybe?

@philwareham philwareham merged commit 9bfee09 into textpattern:dev Oct 27, 2016
@philwareham
Copy link
Copy Markdown
Member

Yep, agreed. Done. Thanks everyone!

@da2x
Copy link
Copy Markdown
Contributor Author

da2x commented Oct 27, 2016

@bloatware would see this message, since redirects are disabled in my daily browser.

I guess that confirmed that this is dead code we’re discussing. You would have noticed this otherwise. Used by plugins, maybe?

@bloatware
Copy link
Copy Markdown
Member

txp_die() is used quite often, though not with 3xx status. Plugins, maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants