Image source turning into .html for xhtml2pdf #3298
Labels
bug
Something isn't working
needs-further-investigation
This issue needs some further research/investigation
Describe the Bug
Found in the server logs. Confirmation is needed whether the PDF was still exported or whether the process aborted.
PIL cannot load the image because it is itself a HTML file. The content is logged as
<img class="alignnone size-full wp-image-576" src="https://www.bamf.de/DE/Themen/AsylFluechtlingsschutz/AblaufAsylverfahrens/Ausgang/Aufenthaltserlaubnis/aufenthaltserlaubnis-node.html" alt="" width="150" height="150"/>
,showing that the
src
is not referring to an image file as would be expected..html
would be that file endings like that are merely convention, and there is nothing stopping a web server from delivering any resource under any URI, regardless of things like filename extensions)src
is requested and served with a redirect, rewriting thesrc
or at least making it appear as the redirect target in the logs. Some servers do this to prevent other websites from using their images I think, which is essentially others off-loading bandwidth for those images to their infrastructure without them profiting from ads or the user seeing their services. The image might also just have been removed from the server since the content was last edited in our system.Steps to Reproduce
TBD – find out which page was attempted to be exported as PDF at that moment and what the potential original source resulting in this is
Expected Behavior
Foreign images included in content should either work across all aspects of our system or fail to do so right away, visible to the editor. Missing or misbehaving images from external systems should be handled gracefully, with the PDF still exporting without the image or a placeholder.
Actual Behavior
The error and traceback appeared multiple times in the server logs. Investigation is needed whether the PDF was still exported or whether the process aborted.
Additional Information
Log Except
Related Issues
The text was updated successfully, but these errors were encountered: