If during the generation of the tickets in PDF format, the system outputs a blank page with an error similar to "TCPDF ERROR: [Image] Unable to get image: /path/to/the/image.jpg" then it's because your server has some restrictions accessing the files from the absolute server path generated by the Joomla! Framework.

Usually this happens on some Virtual Hosts sharing a part of the full server path. Most of the times the Hosting Company is able to grant permissions to your virtual host domain-space to access the files from the absolute path but when this is not possible, it is necessary to convert the path of the image file that could not be fetched, to a relative path.

The first thing you should do is locate the Template-File used by the system to generate the tickets in PDF format. From the Edit page of your Event, you can see what Template-File has been assigned to the Event. You can then find the corresponding file in the following directory of your server:
/components/com_vikevents/helpers/pdf_NAME_OF_THE_TEMPLATE-FILE_ticket.php
The default file is the pdf_tmpl_ticket.php, however, you can also choose the compact format which is controlled by the file pdf_compact_tmpl_ticket.php and it's also possible to create your own template-file.

By downloading the Template-File with an FTP client and by opening it with a good text-editor, you will find a special syntax like the one below:
{event_img}
That special syntax should be changed to an actual image tag with the relative path to the image of the event so that your server will no longer issue that error message:

<img src="images/path_to_the_image.jpg" />

By uploading the image onto the folder images/ (or onto any sub-folder of it), the system will no longer raise that Error Message. Please notice that the structure of the img tag must be identical to the example above and the src attribute must be the first one of the tag.

Once you have modified the file, re-upload it back onto your server and everything will work normally even on your machine with this restriction for accessing certain path-files.

Another Error that that the famous TCPDF class for PHP may return during the generation of the PDF file is the following:
"TCPDF ERROR: Can't open image file: /path/to/server/components/com_vikevents/helpers/tcpdf/cache/mska_8a811...."
In this case the issue is not caused by the server path but rather to a files permission issue.

In order to fix such errors, there are two operations you should make on your server with an FTP client like FileZilla:

  1. Make sure to grant permission to the whole folder and sub-folders "cache". The whole folder should have a 0755 permission.
  2. Empty the folder "cache" by removing all the cache files inside it. The folder "cache" should be completely empty, the only file you may want to leave is the index.html. All the other files should be removed.

If you keep getting the same error even after doing such modifications then it's because the Files Permissions are not correctly set. In that case, use the same FTP client to grant 0755 permission to all files, folders and sub-folders of /components/com_vikevents/ as well as /administrator/components/com_vikevents/.

Last Update: 2015-07-07 15:27
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information