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

Tag ".net" creates invalid pagination #2110

Closed
patrick-steele opened this issue Apr 27, 2016 · 8 comments
Closed

Tag ".net" creates invalid pagination #2110

patrick-steele opened this issue Apr 27, 2016 · 8 comments

Comments

@patrick-steele
Copy link

I'm working on creating a blog and as a .NET programmer, a lot of my posts will be tagged with ".net". I noticed that when generating a paginator for this tag, the link to the next page is incorrect.

The initial page is generated as:

http://localhost:1313/tags/.net/

But the "Next" link is:

http://localhost:1313/tags/index.net/page/2

When it should be:

http://localhost:1313/tags/.net/page/2

Not sure where the extra "index" is coming from.

@bep bep added the Bug label Apr 27, 2016
@bep
Copy link
Member

bep commented Apr 27, 2016

I suspect this is fixed in Hugo 0.16-DEV, though. You are using hugo 0.15, right?

@patrick-steele
Copy link
Author

Yeah, sorry. Forgot to include the version number. This was 0.15.

I'll see if I can get it built locally and re-test. Would that be the pre16 branch?

@moorereason
Copy link
Contributor

No, it's the master branch.

@shapeshed
Copy link
Contributor

This is also an issue for me on 0.16.

|I have tag of node.js in my front matter.

  "tags": [
    "Node.js"
  ]

The initial page is ok /tags/node.js/ but the paginated links are /tags/node/index.js/page/2

shapeshed added a commit to shapeshed/hugo that referenced this issue Oct 3, 2016
The path helper incorrectly transforms valid urls causing issues with
pagination. One example is `.net`

http://localhost:1313/tags/.net/
to
http://localhost:1313/tags/index.net/page/2

The commit adds a regex test to check for `.xml` or `.html` extensions
and applies the transformation on a match.

This allows valid URLs like /foo/index.html/bar to also be passed
through.

Fixes gohugoio#2110
@bep
Copy link
Member

bep commented Feb 28, 2017

This issue has been automatically marked as stale because it has not been commented on for at least four months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/.

This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.

@bep bep added the Stale label Feb 28, 2017
@bep
Copy link
Member

bep commented Mar 1, 2017

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

@shapeshed
Copy link
Contributor

hey @bep. tested this against master. yes this is still an issue. categories with . within the string (e.g. Node.js) causes rendering and pagination to break.

I have created a test case repository here with replication steps.
https://github.com/shapeshed/hugo-2110

@bep bep removed the Stale label Mar 1, 2017
@bep bep mentioned this issue Mar 13, 2017
26 tasks
bep added a commit to bep/hugo that referenced this issue Mar 27, 2017
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done.

This commit's goal is to say:

* Every file target path is created by `createTargetPath`, i.e. one function for all.
* That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on.
* The path creation logic has full test coverage.
* All permalinks, paginator URLs etc. are then built on top of that same logic.

Fixes gohugoio#1252
Fixes gohugoio#2110
Closes gohugoio#2374
Fixes gohugoio#1885
Fixes gohugoio#3102
Fixes gohugoio#3179
Fixes gohugoio#1641
Fixes gohugoio#1989
@bep bep closed this as completed in 6bf010f Mar 27, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants