Buy Now
Sign in

TCPDF ERROR: Unable to create output file: only when accessing form from admin side

netamity , May 28 2021, 06:42
netamity 15
May 28 2021, 06:42 #396572
I have a form that creates a pdf. It works prefectly when accessing the form from the front end, but I's like a back end version. As far as I can tell everything else works. It's saving data, but getting stuck at the pdf creation stage. The storage folder is outside the public directory at: /homepages/7/d444920525/initial_assessments/initial_assessment_{data:client_ref}.pdf
and that's all fine from the front end. Is there ay reason it's not accepting this absolute path in the admin side only? Could it be a permissions issue? Or does TCPDF work only in the front end?
netamity 15
May 28 2021, 09:22 #396573
There's an issue with the way chronoforms is processing the path
I note from that it says "NB the path strings will include the /administrator/ folder if viewed from the back-end of the site.", which it must be doing, even though the error message doesn't have any reference to the administrator path.
If I set a path in the public folder like {path:front}/pdf/initial_assessment_{data:client_ref}.pdf it works fine from the front of back end, but I can't have these files being saved in a pubic directory.
How can I get past this?