verbb / wishlist

A Craft CMS plugin for wishlists for your users to save things to
Other
11 stars 12 forks source link

Font temp dir in domPDF #92

Closed tom-c closed 2 years ago

tom-c commented 3 years ago

Description We're trying to use a brand font in our PDF template, as we do with regular commerce receipts, but upon first load domPDF is moaning about the lack of a '/storage/runtime/temp/wishlist_dompdf' directory. Creating the directory manually fixes any issues, so it might just be permissions but didn't have the same issue with commerce PDFs so thought I should report it.

Steps to reproduce

  1. Use a TTF font in your PDF styles
  2. Load PDF in browser

Additional info

Additional context Running in local dev, vagrant homestead, standard install

Fails at line 1176 of dompdf/lib/Cpdf.php

// Write new font
$tmp_name = $this->tmp . "/" . basename($fbfile) . ".tmp." . uniqid();
touch($tmp_name);
engram-design commented 3 years ago

Yeah, I'm come across this issue also recently. I'll see what I can do about this, but because this temp path is defined in DomPDF, which we don't have access to, it might be tricky.

engram-design commented 3 years ago

Should be fixed for the next release. To get this fix early, change your verbb/wishlist requirement in composer.json to:

"require": {
  "verbb/wishlist": "dev-craft-3 as 1.4.11",
  "...": "..."
}

Then run composer update.

engram-design commented 2 years ago

Fixed in 1.4.12