Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative textile links generated as absolute links #113

Closed
ghost opened this issue Oct 4, 2014 · 2 comments
Closed

Relative textile links generated as absolute links #113

ghost opened this issue Oct 4, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 4, 2014

From shinywhi...@gmail.com on May 04, 2011 22:47:50

What steps will reproduce the problem? Create a textile link of form:

"About SWB":about-swb page

This (in my reading of the docs) should generate a link to the item after the :.
It does - but it's absolute, and not relative.

This (I think) is a bug in itself. However a more serious issue (which I'll raise a separate bug for, and try to link the two since I believe they are related) is that it encodes the domain name directly into the link. If as a user you maintain two/three different environments for testing, it then means you either have to resave each document (not a serious solution) or SQL run a script against the generated HTML cache (textpattern table). Both of which are not ideal solutions.

Oh, and if you use an absolute link such as:

"About SWB":/about-swb page

Then you get the expected out (and no domain name is embedded into the link either). What is the expected output? What do you see instead? Expect:
Instead, I see: What version of the product are you using? On what operating system? 4.4.0. OSX 10.6.7 and also CentOS 5.x (this issue appears OS independent) Please provide any additional information below.

Original issue: http://code.google.com/p/textpattern/issues/detail?id=109

@ghost ghost added imported labels Oct 4, 2014
@ghost
Copy link
Author

ghost commented Oct 4, 2014

From shinywhi...@gmail.com on May 04, 2011 13:52:51

I didn't write another test report. Although I think there are two bugs here, I'll leave it to you to interpret if you think it's two, one, or zero.

Related posts on the forum include: http://forum.textpattern.com/viewtopic.php?pid=245766#p245766 http://forum.textpattern.com/viewtopic.php?pid=161464#p161464 In defense of this being a bug: We recently deployed from a staging environment to production. It was our first txp install. Finding that the URLs were embedded seemed to me to be just "wrong". It was fortunate for us that changing all the URLs to have a leading slash worked as a workaround. It also seems to me that having a side effect of embedding the host name in the URL based on the relative/absolutness of the URL isn't consistent behavior. Adopt one or the other (and I'd vote for no host name at all, is it needed?).

I guess I feel that it was so subtle that it needs this write up! Something I really didn't expect to see, and caught me off guard.

@ghost
Copy link
Author

ghost commented Oct 4, 2014

From r.wetzlmayr on January 09, 2012 22:29:36

This is by design. Use root-based URLs when you want domain independence.

Status: WontFix

@ghost ghost closed this as completed Oct 4, 2014
This issue was closed.
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

No branches or pull requests

0 participants