No pictures when saving pdf

Plus d'informations
il y a 3 semaines 4 jours - il y a 3 semaines 4 jours #33 par Alex-Mata
Hello. The component is great, but an oddity has arisen. On one site the questionnaire in pdf is saved with pictures, but on the other site - without pictures, only squares. The path to the pictures is completely - with the domain. And when adding a media field with multiple photos, a json_decode() error occurs: Argument #1 ($json) must be of type string, array given
Dernière édition: il y a 3 semaines 4 jours par Alex-Mata.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 3 jours #34 par shane
Réponse de shane sur le sujet No pictures when saving pdf
Hello,

Thank you for your message and for the positive feedback on the component!

If I understand correctly, you’re facing two issues:

1. Some images are not displaying in the PDF and are appearing as squares.

2. You're encountering a JSON decode error when using multiple images.

For the first issue:

Do the images exist on the site, and do the paths appear correct? Are you able to access the images directly using the paths generated in the PDF? If the images exist and the paths are correct, this could indicate a file access permissions issue.

For the second issue:

Could you provide more details on how the field is set up? Are you using an image list field or another custom field? A screenshot of the field setup would also be helpful.
Additionally, could you enable site debugging and send the stack trace or, at minimum, the file and line number where the JSON decode issue occurs?

With this information, we’ll be able to diagnose the problem more effectively and provide a solution.

Thank you!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 1 jour #36 par Alex-Mata
Réponse de Alex-Mata sur le sujet No pictures when saving pdf
Good afternoon
I apologize in advance, I use GPTChat for translation :) I hope the message will be clear.
Yes, that's right, two problems:
1. No images are displayed in the generated PDF. Moreover, I add the image directly to the template, through the Basic-Image panel and it is visible in the template, but when generating a PDF, it is replaced by a crossed-out square. The same thing happens with images inserted as a dynamic field, for example Image-Intro (it is not displayed in the template). The images exist, and the paths are correct, images are displayed when viewing the material page. Did you suggest viewing the paths generated in PDF? Can you tell me how to do this?
2. For the second problem, the situation is as follows. We had a test site on which all the ok images from the template and from the custom template fields are generated, i.e. everything is ok.  But when adding a field containing several images to the template, the error described above occurs. (json_decode(): Argument #1 ($json) must be of type string, array given). The fields in which there is one image and with which everything is ok on the test server contain the following entries {"imagefile":"images\/160824\/5ec270b4bb2e9480b13d2e3cdcf4519bdb653dd3.jpeg ","alt_text":""}. Entries that contain multiple images have the following format {"row0":{"field225":{"imagefile":"images/160824/17cdbc8d72656463a8c9f76cf7cc3dfdcc328b97.jpeg#joomlaImage://local-images/17cdbc8d72656463a8c9f76cf7cc3dfdcc328b97.jpeg?width=585&height=667","alt_text":""}},"row1":{"field225":{"imagefile":"images/160824/30e7dcd5f98eb92743ca254fb64a0651de986977.jpeg#joomlaImage://local-images/30e7dcd5f98eb92743ca254fb64a0651de986977.jpeg?width=585&height=667","alt_text":""}}} and when using fields containing similar entries, the json_decode() error crashes on the test: Argument #1 ($json) must be of type string, array given).

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 1 jour #37 par shane
Réponse de shane sur le sujet No pictures when saving pdf
Thank you for providing the detailed explanation of the issues you're experiencing. To help diagnose and resolve these problems more effectively, I would need to examine the system configuration and specific files involved. Could you please provide either:

Access to your test server, credentials can be sent to me securely at shane@com3elles.com, or
A backup of your site.

This will allow me to investigate both the image display issue and the JSON decoding error directly and provide a proper solution.

Looking forward to helping you resolve these issues.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 semaines 1 jour #38 par shane
Réponse de shane sur le sujet No pictures when saving pdf
Hi, I forgot to mention that you can view the HTML used to generate the PDF by enabling the debug option. You can access it either from the File Edit view by going to Actions > Debug, or from the Files List view as outlined in the documentation: PDF Generator Documentation - Files List View .
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 2 jours #39 par shane
Réponse de shane sur le sujet No pictures when saving pdf
Issue Resolved

For anyone facing a similar issue, please ensure you’re using a valid SSL certificate when working over HTTPS. Without this, dompdf will not be able to render images.

We are investigating this issue to implement a solution that will help prevent it in the future. In the meantime, if you encounter this issue, confirm that your SSL certificate is valid.

For any external images that aren’t displaying, please also verify that the SSL certificate of the resource is secure and compliant. Otherwise, the image will not be displayed.

Connexion ou Créer un compte pour participer à la conversation.

Login

Besoin d'un développement ?

Vous avez besoin d'un composant, d'un plugin, d'un module ou d'un template ? Nous pouvons le réaliser grâce à notre équipe composée d'un Administrateur certifié Joomla! admin, d'un webdesigner et d'un développeur fullstack. 

Secure payment

by Paypal and Stripe

    

Copyright Com'3Elles @ depuis 2023
https://extensions.com3elles.com  n'est ni affilié à Open Source Matters ou au projet Joomla ni approuvé par eux.
Le nom Joomla!® est utilisé sous licence limitée de Open Source Matters, le propriétaire mondial de la marque de commerce.