Hi @lukashuggenberg – thanks for trying out the plugin, sorry you ran into an error.
This usually happens because a host prevents access to the post featured image URLs from within the plugin. Would you be willing to share which host you’re using? Is there anything special about your setup in terms of custom post types, images served from a non-standard location, or similar? What version of WordPress and what version of the plugin you are using?
Also, does the PDF generation work when you don’t included featured images?
Thanks for any additional information you can provide.
Hi Chris,
thanks for the fast reply!
The site is hosted on infomaniak.ch.
The cpt has been created with CPTUI, the images are in the media library.
The PDF generation works when the featured images aren’t included.
But: the single post template is a Twig template built with
Toolbox for Beaver Builder and Timber – now I suspect that this could be the reason. The template has been developed by a programmer I could ask if he would like to discuss this further with you.
Best,
Lukas
Hi Chris,
when I re-read the thread to ask the programmer if he would look into this (waiting for his answer), I noticed that I forgot to give these answers:
WP 5.9
Plugin version 1.1.2
Best,
Lukas
Hi Chris,
Here is what the freelance developer found:
The plugin throws a generic error when it could not get the size of the image. That seems to occur when, in the views/admin/pdf/pdf-template.php file there is no width and height property provided with the tag.
Although I’ve provided them now on staging by altering that file, and it prevents it from throwing an error, I still don’t see an image.
Furthermore, there’s no image for the QR-code either. Surely that doesn’t have anything to do with your site, it’s loading that from chart.googleapis.com according to the code.
Best,
Lukas
If you want me to set up an admin account for you on a staging site, let me know.
@lukashuggenberg Please don’t offer to send or post logon credentials on these forums:
https://wordpress.org/support/guidelines#the-bad-stuff
thanks for pointing me to this, sure I wouldn’t send them publicly, I would ask for a private channel.
The point is, @lukashuggenberg, you may not even offer credentials here. At all.
You can contact the author on their own site and, once there, the discussion is between the two of you. However, it is not OK to enter or send site credentials on these forums. We don’t want to encourage others (who are less reputable) to do similar things. It’s a fine line, but one that we need to enforce. Thanks for your cooperation.
Chris,
is there a chance to get your plug-in running?
Best,
Lukas
Hi @lukashuggenberg – could you have your developer test out the results of file_get_contents()
and maybe curl
to retrieve the image URL from the same server environment where your site is running, to see if that works?
The library my plugin is using, tcpdf, uses these kinds of calls to fetch the image and determine its size; if they cannot successfully retrieve it in your hosting environment, then it’s unlikely that the plugin will support featured image display in the generated PDF.