Closed patric-dosch-vi closed 5 years ago
hello everyone, hello @tHerrmann, the topic generates more and more attention with us, because in the Google Console more and more 500er of this kind appear and unfortunately can not disappear any more.
I think the behavior is a bug and should be fixed. At the moment I'm still missing a clue how exactly. Do you have a clue? Maybe I can contribute something to the solution.
Best, Patric
Hi Patric, the commit above should fix the issue. Please let me know, if it is not working for you. Reards, Tobias
hey @tHerrmann, thank you very much! I also had the fix in the CmsPdfLink, unfortunately I overlooked that the exception has to be handled in the CmsPdfResourceHandler, I suspected that it happens in the core.
Best, Patric
Fixed in branch_11_0_x.
hey opencms team,
we use the pdf-generation from OpenCms, so far so good. But when the content is deleted (or just enter a fake url), the /pdflink ends up in 500 instead of a 404, as I would rather expect.
I think in
org.opencms.pdftools.CmsPdfLink#CmsPdfLink(org.opencms.file.CmsObject, java.lang.String)
CmsUUID id = cms.readIdForUrlName(detailName);
do not respect, that the id could be null.Then the cms.readResource throws “org.opencms.file.CmsVfsException: Error reading resource with the ID null.” and do nothing meaningful with it. That’s bubble up to
org.opencms.pdftools.CmsPdfResourceHandler#initResource
and throws the exception (because it’s not a filenotfound).Best, Patric