• Resolved piccart

    (@piccart)


    Hello,

    since we updated the plugin to 7.1.5 we are seeing several error logs which appears to be triggered by a cron job which tries to generate a pdf using Mpdf library.

    we had problems in the past in relation to the temporary folder for Mpdf ( see here ) but I am not sure if this is a regression of the same problem or if it’s a different thing.

    I’ve traced back the errors and they indeed lead to the same bit of code, which I see has been modified in the latest version of the plugin.

    /documents/class-document.php line 2005

    $mpdf = new Mpdf\Mpdf($mpdf_args);

    the error is: “Warning: Trying to access array offset on value of type null” and it’s actually triggered by some code within the Mpdf class itself (line 162 of /complianz-gdpr/assets/vendor/mpdf/mpdf/src/Otl.php ), which is fired on Mpfd initialisation. That bit of code is related to fonts, similarly to what happened in the past.

    there are a few other errors generating from the following logic on class-document where the $mpdf object is then handled, so I think that something goes wrong with the configuration of that object.

    If this is related to our setup (see the other thread for details) Is there anything we can do via filters maybe?

    thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Antonio Candela

    (@antoiub)

    Hello @piccart ,

    Thank you for reaching out.

    I have created a task for our developers so they can properly investigate this issue. Please note that there is currently an undefined ETA.

    Regards.

    Plugin Support Antonio Candela

    (@antoiub)

    Hello @piccart ,

    The developers have reached back and mentioned that they fixed this in version 7.1.5, addressing an issue with PDF generation using mPDF, which is executed daily through the generate_cookie_policy_snapshot() function.

    Are you using any mu-plugin that overrides the temporary path for the mPDF?

    Thread Starter piccart

    (@piccart)

    hello @antoiub and happy new year!

    The problem is definitely still happening with version 7.1.5 and it also happens with 7.1.4 but we’re not experiencing it with version 7.1.0 (which is what we are using at the moment). I suppose that those edits introduced to fix the other problem, have caused a regression of the issue we had in the past with mPDF temp folders.

    Are these temporary folders still under the /uploads/ path? We are using a S3 bucket as cdn for uploads, hence we have a plugin which handles rewrites and redirects when uploading/reading from the wp uploads paths. I suppose that your code gets confused when dealing with the cdn, though I can see several folders under /complianz/ in the S3 bucket, including 2 fonts under this path /uploads/complianz/tmp/SOME_HASH_CODE/mpdf/ttfontdata/

    I am not sure precisely what caused the conflicts with mPDF, but if you have a look at the old ticket you can find more info about our setup and what has been done on your side in order to avoid problems when someone uses an external cdn. It feels that the files are initially stored correctly in the cdn, but then when mPDF tries to read them it doesn’t look into the cdn but in the default wp folders…

    Plugin Support leonardoiub

    (@leonardotamion)

    Hello @piccart ,

    I’m sorry for this delayed answer.

    We opened a task for the dev team, as soon as we’ll have more information about it we’ll share them with you.

    Thanks for your patience

    Plugin Support leonardoiub

    (@leonardotamion)

    Hello @piccart,

    thanks for your patience.

    I talked with our dev team and they told me that count should return the temporary files generated by mpdf.

    If it doesn’t find them it gives the error, at the moment ignoring the temporary paths would be the best solution since they are temporary paths, just the time to generate the pdf and everything is deleted.

    The dev team will work on the task previously created but unfortunately there are other priorities to solve.

    Thanks a lot for your patience and cooperation.

    Thread Starter piccart

    (@piccart)

    ok thanks!
    would be nice if you could ping me here whenever the fix is deployed.

    Thread Starter piccart

    (@piccart)

    hello!
    just checking to see if this issue has been addressed in the latest releases or if it’s still in the queue?

    cheers!

    Thread Starter piccart

    (@piccart)

    hello @leonardotamion !

    any news regarding this problem?

    Thread Starter piccart

    (@piccart)

    hello @antoiub and @leonardotamion

    just wondering if there is any news about this?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Problems with Mpdf when generating documents via cron’ is closed to new replies.