Issues with Barcodes (QR Codes) 1.7.9RC3

edited December 2020 in General Support

After installing Collective Access version 1.7.9RC3 on a local (WAMP server) and a live(shared hosting) test server I am having trouble generating barcodes.
More specific QR codes linking directly to the object editor for the specific object.
I have two places where I generate the QR codes:
1. In app/PrintTemplates/labels/local I have php label files where I use {{{barcode:qrcode:2:www.xxxxx.nl/index.php/editor/objects/ObjectEditor/Edit/object_id/^ca_objects.object_id}}} to have a QR code printed.
2. In a display that I use for a summary (using custom css and php files in app/PrintTemplates/layout/local) using the same code (with an extra curly brace at the end, otherwise it will not work in V 1.7.8) :{{{barcode:qrcode:2:www.xxxxx.nl/index.php/editor/objects/ObjectEditor/Edit/object_id/^ca_objects.object_id}}}}

In both cases in version 1.7.9RC3 the PDF outputs image not found or type unknown instead of the QR code.

Is barcode printing depreciated in V 1.7.9RC3?

Comments

  • It seems that formatting using the pdf.css is not working as it did in version 1.7.8 either.
    I am using the "default" DOMPDF as I am on a shared server and cannot install extra addons (That are not provided by the hosting provider).

  • This is due to a change in the latest version of domPDF. It now enforces directory restrictions that break some hosts that rely upon symlinks. We're adding a fix for it (we got another report of this this morning).

  • Thanks, that would be great.
    In that case (for my use) it seems 1.7.9RC3 would be ready to use.

  • Today I tried the 1.7.9RC4 release. The issue persists.

  • Your code dropped into a labelling template works fine on my test systems. I get a valid QR code as expected.

    Do you have GD installed on this system? The QRCode library requires it; I assume since it worked 1.7.8 GD is installed. Assuming GD is there, my next question would be when you installed the latest 1.7.9 did you replace everything, including the vendor/ directory? There's a change in DOMPDF version that's supposed to fix this.

    Finally, assuming the above checks out, is your provider using symlinks in the directory path to your web server root?

    Failing any of the above being the problem, would it be possible for me to see this system?

    Thanks,
    Seth

  • edited December 2020

    Hello Seth,

    I do have GD installed (Both on my local WAMP based installation and on my hosted installation)
    I did replace everything including the vendor/ directory BUT I noticed the DOMPDF version is the same as in the 1.7.9RC3 download and it is 28 days old according to github.
    Is this the changed DOMPDF version you are referring to?
    As far as I can see the provider uses symlinks (public_html is a symlink to .domains/domainname/public_html and private_html in the domain/domainname folder is a symlink to public_html)

    In which way would you like to see the system? As the application or via FTP

  • I think it's the symlinks. Let's try one more RC (coming later today), and if it still doesn't work then I'd need FTP + application access.

    Thanks.
    seth

  • edited December 2020

    I dont know if this is relevant, but I had to screw around with /tmp directory paths because of something that changed with permissions, and domPDF's ability to access the /tmp directory (where the QR code image is stored). Originally the /tmp directory was outside of /public_html so it was not reachable by a url, only a directory path. domPDF now cant read the /tmp directory via a directory path, so I had to move /tmp to the root so it could be reached as https://mydomain.org/tmp....which doesn't seem as safe. But it fixed my problem quickly.

    Is this related?

  • We've added a setting to allow you to control what the directory "chroot" is for dompdf. The issue is that it can only be a single directory and it needs to encompass any loadable asset (qrcode, image, css) that may be loaded. Symlinks are not traversed, so the directory needs to encompass everything. It's a bit of a pain.

  • Can you try the new 1.7.9rc5? Hopefully this is sorted finally... https://github.com/collectiveaccess/providence/releases/tag/1.7.9rc5

  • Hello Seth,

    QR codes are fine with 1.7.9RC5.
    I could not find the setting to control the directory "chroot" for DOMPDF.
    I assume it is not needed anymore? (If I understand correctly you reverted to the older DOMPDF?)

  • Yes I just reverted to the older dompdf for this release.

Sign In or Register to comment.