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 · 1 comment

Comments

Projects
None yet
3 participants
@gcushen
Copy link

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

@gcushen gcushen referenced this issue Apr 14, 2019

Closed

Add Support for Hugo v0.55+ #1017

7 of 7 tasks complete

@bep bep added Bug and removed NeedsInvestigation labels Apr 15, 2019

bep added a commit to bep/hugo that referenced this issue Apr 15, 2019

hugolib: Fixed bundle resource publishing when multiple output formats
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

hugolib: Fix bundle resource publishing when multiple output formats
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

hugolib: Fix bundle resource publishing when multiple output formats
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 in #5862 Apr 15, 2019

bep added a commit that referenced this issue Apr 15, 2019

hugolib: Fix bundle resource publishing when multiple output formats
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

This comment has been minimized.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.