[opencms-dev] /pdflink for not existing file throws null-error instead of file-not-found
Patric Dosch
patric.dosch at virtual-identity.com
Thu Mar 28 17:47:28 CET 2019
Hey guys,
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).
Is the resource-check in the pdf-handling complete missing or is there something I’m overseen?
Any ideas to solve this?
Best, Patric
Patric Dosch
Senior Developer
Virtual Identity AG
Grünwälderstraße 10-14
79098 Freiburg
t +49 761 20758-442
f +49 761 20758-01
m +49 152 54561033
patric.dosch at virtual-identity.com
http://www.virtual-identity.com
Freiburg | München | Wien | Porto
________________________________
Virtual Identity AG
Grünwälderstraße 10-14
79098 Freiburg
Amtsgericht Freiburg, HRB 6218
Vorstand: Ralf Heller
Vorsitzende des Aufsichtsrates: Kirsten Heller
Umsatzsteuer-ID: DE208002218
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20190328/366627d5/attachment.htm>
More information about the opencms-dev
mailing list