pywb documentation claims that the wbrequest object is available for the not_found.html template. However, wbrequest is not available when a not found error occurs during non-proxy replay.
In a way it makes sense because the template being displayed is probably not the result of a web archive request. But it would be great to have the object available for the request that originally failed so users could be recommended to go to other places in the collection. However the template won't know about which collection the user was browsing or what the collection's base URL is etc unless the webrequest object would be made available.
Steps to reproduce the bug
Start out with new pywb 2.7 install.
Initialize a new collection test via wb-manager init test
Create custom error message for the collection via wb-manager template --add not_found_html
files base.html and not_found.html appear in collections/test/templates/.
pywb documentation claims that the
wbrequest
object is available for thenot_found.html
template. However,wbrequest
is not available when a not found error occurs during non-proxy replay.In a way it makes sense because the template being displayed is probably not the result of a web archive request. But it would be great to have the object available for the request that originally failed so users could be recommended to go to other places in the collection. However the template won't know about which collection the user was browsing or what the collection's base URL is etc unless the webrequest object would be made available.
Steps to reproduce the bug
wb-manager init test
wb-manager template --add not_found_html
files base.html and not_found.html appear in collections/test/templates/.echo "hi {{ wbrequest }}" > collections/test/templates/not_found.html
Expected behavior
The contents of the
wbrequest
object should be rendered.Environment