Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mpdf #21

Closed
timurc opened this issue Dec 9, 2021 · 7 comments
Closed

Update mpdf #21

timurc opened this issue Dec 9, 2021 · 7 comments
Assignees

Comments

@timurc
Copy link

timurc commented Dec 9, 2021

Hey,

I just added it to one of the pages I manage and it worked great, thanks a lot!

When I pushed it to production, I got server errors and the PDF did not render:

PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in [...]/wp-content/plugins/wp-mpdf/mpdf/mpdf.php on line 2349

I got this because I use PHP 8. I am now using 7.3 to circumvent this.

I assume this would be fixed if mpdf would be updated, because the currently used version of mpdf (6.1) is pretty old.

I don't know how actively maintained this is and if it's too much to ask. I would look into it myself, but I am currently very short in time and also I don't have very deep php knowledge. I looked into it briefly, but not very deeply but I would love to be able to use a newer PHP version again.

@fkrauthan
Copy link
Owner

Hi yeah, I do have already a branch ready for a much newer mpdf version. If you want you could give that branch a try as I am not actively using this plugin anymore. I will try todo some more testing before the new year and release that new branch.

@timurc
Copy link
Author

timurc commented Dec 10, 2021

Hey Florian, Thanks! Sure, I would take a look at it and see if it works! I would guess it's mpdf-8-upgrade? I'll try to carve out some time for it in the upcoming week.

@fkrauthan
Copy link
Owner

Yeah exactly. You can download the plugin folder from my gdrive for testing (https://drive.google.com/file/d/1-NTmZE6KajBANMlJQ3QCy3Meg9fPsjDB/view?usp=sharing). If you want to test it from the the source you would have to install composer and run composer install first before adding it to your wordpress.

Please let me know how your testing goes. If all goes well I can release it as early as next weekend.

@timurc
Copy link
Author

timurc commented Dec 10, 2021

Very good! I wasn't hoping for such a quick update.

I testet it and the PDF rendering went just fine.

One problem I found: when using PHP 8 the "need login" option in the admin panel is not persistent, can't turn it off. Sometimes it just re-checks itself on save, sometimes it stays off but will be on again after re-load. I did not see errors for this. It does not happen with PHP 7.3

Can I supply with anything else to debug, or are there specific things to look for while testing?

@fkrauthan
Copy link
Owner

Just in general if you have any complex posts or something like that to ensure it still prints as expected

@fkrauthan
Copy link
Owner

Ok new version 3.7 is now published.

@timurc
Copy link
Author

timurc commented Dec 14, 2021

yay, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants