In testing #3017423: Create an API for handling redirects I found that redirects to a file do not result in the target of the redirect being included in the static output. As I dug into this, it doesn't look like a file like a .pdf or .txt is included if it is the target of a menu item or even in a media field of a content type.

Are images the only supported file type?

display of node with 404s

form input with files

Comments

kreynen created an issue. See original summary.

kreynen’s picture

Issue summary: View changes
kreynen’s picture

Issue summary: View changes
samuel.mortenson’s picture

For the redirect part of this issue, I'd like to write a patch that adds redirect destinations to the static paths.

For the links to files, applying the latest patch in #3011732: Paths should be derived for Views with contextual filters should result in them getting exported. That issue adds light-weight crawling to Tome that will adds anchor hrefs to the static paths.

kreynen’s picture

That patch for #3011732: Paths should be derived for Views with contextual filters did result in the files linked from menu items and field fields being included.

samuel.mortenson’s picture

Title: When are files included in static output? » Redirect destinations not included in static export
Assigned: Unassigned » samuel.mortenson
Category: Feature request » Bug report
samuel.mortenson’s picture

Status: Active » Needs review
StatusFileSize
new1.91 KB

Here's a quick fix for the redirect problem.

kreynen’s picture

Status: Needs review » Reviewed & tested by the community

This solved the redirect problem for my specific use-case. Not sure if there are other scenarios to consider, but it's working for https://map.colorado.edu/

  • samuel.mortenson authored 86b53f7 on 8.x-1.x
    Issue #3022112 by samuel.mortenson, kreynen: Redirect destinations not...
samuel.mortenson’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @kreynen!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.