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

0.55: resource in bundle is found but link is invalid #5858

Closed
gcushen opened this issue Apr 14, 2019 · 2 comments · Fixed by #5862
Closed

0.55: resource in bundle is found but link is invalid #5858

gcushen opened this issue Apr 14, 2019 · 2 comments · Fixed by #5862

Comments

@gcushen
Copy link

gcushen commented Apr 14, 2019

In v0.53 and prior versions, the following code would generate a link to the ".bib" file in a page bundle. In v0.55, the resource is found (GetMatch is successful) and the download link is generated (.Permalink and .Content are correct), but the resource link is 404 as Hugo no longer copies the bundled file across to the generated site output.

Code which links to the resource: https://github.com/gcushen/hugo-academic/blob/01114416aaaafd61022c79deca445b1ca8bd70f7/layouts/partials/page_links.html#L32

Example page bundle containing the ".bib" file that no longer appears in the generated site for v0.55: https://github.com/gcushen/hugo-academic/tree/master/exampleSite/content/publication/conference-paper

To reproduce, run the above example site in v0.53 and the publication/conference-paper page will have a Cite link generated at the top of the page that displays the contents of the bundled *.bib file when clicked.

Then re-run in v0.55 and the "Cite" resource link is still generated, but the link is invalid and leads to 404 error as the bundled file is no longer copied to the output.

See https://discourse.gohugo.io/t/v0-55-404-error-resource-in-bundle-is-found-but-link-is-invalid/18056
See #5846

@bep bep added this to the v0.55.2 milestone Apr 14, 2019
bep added a commit to bep/hugo that referenced this issue Apr 15, 2019
The faulty logic published the bundled resources for the "first output" format.

This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.

Fixes gohugoio#5858
bep added a commit to bep/hugo that referenced this issue Apr 15, 2019
The faulty logic published the bundled resources for the "first output" format.

This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.

Fixes gohugoio#5858
bep added a commit to bep/hugo that referenced this issue Apr 15, 2019
The faulty logic published the bundled resources for the "first output" format.

This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.

Fixes gohugoio#5858
@bep bep closed this as completed in #5862 Apr 15, 2019
bep added a commit that referenced this issue Apr 15, 2019
The faulty logic published the bundled resources for the "first output" format.

This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.

Fixes #5858
@mlake
Copy link

mlake commented Apr 28, 2019

Having a similar issue - it works SOME of the time. See attached screenshot for clues..
Was working fine in 0.54, but this is happening in 0.55.4 so seemingly there's still some issue here..

output_format_hugo_bug

@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 Feb 18, 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.

3 participants