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

<base href=""> generated incorrectly #2649

Closed
OvermindDL1 opened this issue Jan 27, 2017 · 9 comments
Closed

<base href=""> generated incorrectly #2649

OvermindDL1 opened this issue Jan 27, 2017 · 9 comments
Assignees
Milestone

Comments

@OvermindDL1
Copy link

OvermindDL1 commented Jan 27, 2017

The <base href> in the <head> is being generated wrong on some pages.

For example, in my /tags/index.html file (via conf.py entry of TAGS_INDEX_PATH = "tags/index") the base element is:

<base href="http://mysite.com/tags%5Cindex.html">

The %5C is causing all relative links on this page to fail, no tag sections can be accessed from here.

$ nikola --version
Nikola v7.8.3
@Kwpolska Kwpolska added this to the v7.8.4 milestone Jan 27, 2017
@Kwpolska
Copy link
Member

I cannot reproduce with v7.8.3 on macOS, this is what I get:

<base href="https://example.com/tags/index.html">

But do you really need the <base> tags? Experience shows you don’t.

@OvermindDL1
Copy link
Author

But do you really need the <base> tags? Experience shows you don’t.

Not really and I have it disabled, it was just a bug that I ran across and was able to reliably reproduce. Feel free to git clone https://github.com/OvermindDL1/overminddl1.github.io.git, adjust the conf.py to re-enable the base element, then nikola build, the tags/index.html that is generated is wrong. Also, why do I have to mark it as tags/index to generate a tags/index.html? The full name would be better in the config.

@ralsina
Copy link
Member

ralsina commented Jan 27, 2017

TAGS_INDEX_PATH = "tags/index"

That doesn't look right to me. TAGS_INDEX_PATH is supposed to be either a filename or a full path relative to TAG_PATH

@Kwpolska
Copy link
Member

I still can’t reproduce with your site:

<base href="http://blog.overminddl1.com/tags/">

Make sure lxml and other dependencies of Nikola are up-to-date.

@OvermindDL1
Copy link
Author

That doesn't look right to me. TAGS_INDEX_PATH is supposed to be either a filename or a full path relative to TAG_PATH

That was my thinking, you'd think it would be a full path so I should put tags/index.html, however if I do that then it generates a tags/index.html.html in the output directory...

Make sure lxml and other dependencies of Nikola are up-to-date.

Hmm, I did that this morning, and just tried again now but it is currently saying "Requirement already up-to-date", I've tried to upgrade every package I see through pip that I have, but no change.

I am on Windows here (though I usually use linux), perhaps that is affecting things (maybe it thinks the / is an invalid path-sep on Windows so it is encoding it instead of leaving it alone as it should?).

@felixfontein
Copy link
Contributor

Hmm, the generation of tags/index.html.html is clearly a bug. Should be fixed in PR #2652.

@Kwpolska Kwpolska modified the milestones: v7.8.4, v7.8.5 Mar 26, 2017
@Kwpolska
Copy link
Member

@OvermindDL1 Are you still experiencing this bug?

@ralsina
Copy link
Member

ralsina commented May 6, 2017

3 weeks without reply and could not reproduce... closing, can reopen if it happens again.

@ralsina ralsina closed this as completed May 6, 2017
@OvermindDL1
Copy link
Author

Sorry, hard to to test currently, will re-open if any issues. As stated, I have that disabled so it is not in my main set. ^.^

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

No branches or pull requests

5 participants