PDF not showing or being created
-
Hi,
I get this error message when trying to create an pdf invoice from an order:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 786432 bytes) in /storage/content/80/4001080/friendy.se/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/lib/html5lib/TreeBuilder.php on line 2565
I have gone thru the diagnostics on: https://www.ads-software.com/support/topic/read-this-first-9/. And everything show green light in the system status and 128 mb memory. Also no problem creating a html page of the invoice.
So what can be the problem? And how to fix. The plug in has worked perfect over a year until a couple of days ago. Site: https://www.friendy.se
-
Hi,
I have the same problem. Could you please fix it?
Thank you.
Here’s a guide with information on how to solve memory issues:
https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/memory-issues/@lanoreno it looks like you may have been close to the memory limit before and only just crossed it. The error indeed shows you’re running out at 128M, so that corresponds with the Status page, just not enought for your requirements.
Both: You could try the beta of 2.0 which will be released next week. This may solve your memory issue without increasing your memory limit.
https://wpovernight.com/2017/06/woocomerce-pdf-invoice-2-0-beta-testers-wanted/Let me know if that helps!
EwoutHi,
I tested a few possibilities. Nothing happens.
At least I deactivated some of the PlugIns to generate free memory.
With 29 MB free memory, there is still an error displayed:Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3072 bytes) in /var/www/ud18_48/html/ichnatur-wp/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/include/text_frame_reflower.cls.php(376) : runtime-created function on line 1
Before I deactivated the PlugIns, it “tried to allocate 89 bytes”.
I think, it’s another problem.
Regards
DanThere IS something with the memory. I found out that to add 2 Products, I need over 4 MB free memory plus the memory for the invoice. There is something special in your code, I think.
Can you please fix it?
Best regards
DanHello Dan,
Nothing has changed in the last 1.6.6 update that affects the PDF generation. The number of bytes it tries to allocate is different all the time because that depends on the last process that runs within memory.1.6.6 is the last release of the 1.x series. Please test with 2.0 first. If you get the same issue in 2.0 I can take a look at possible fixes.
Ewout
Hi,
I have a problem creating PDF Invoices. It worked well all the time but since yesterday the plugin doesn’t create the PDF anymore. I am confused since I didn’t change any settings and it still works well with the packing slips. Please help asap.
Best,
KhaledHello Khaled,
Are you perhaps using the ‘Extended currency symbol support’ option in the settings? The currency font was actually the only thing that updated in the last version besides the preparations for 2.0.
If so, can you try if turning that off fixes the issue? Please also read the posts above as they may help in answering your question: Are you getting any errors?Same for you: I recommend trying 2.0 beta to see if that fixes your issue since this is the next release.
Ewout
I found out, that there is something with the update of your plugIn. The last two times I updated it, there are the problems we all three have had. The next day, everything was ok. This time I found out, that at the problem-day, I had problems with the memory limit. 114MB of 128MB. The whole day I tried to fix the problem, but no plugIn or theme or wordpress used all the memory. On the next day the problems were magicly solved. memory= 52MB of 128MB. There is only one explanation that makes sense:
The only plugIn I actualised was yours. There must be something in the update-routine, that occupied the RAM. If the problem also appears the next time, I chose another plugIn for the future.
Ewout, for me it is not ok, that you always search at others for the problem, but not yourself. I wasted many hours with my problem, that was not a problem of my system. This time I better played with my children. Please clean up your scripts. And for the future: if several people have the same problems, please think about if it’s perhaps a problem with your product.
Daniel
Hello Daniel,
I’m sorry if I gave you the idea that the issue was somewhere else. I was only pointing out that 1.6.6 is being discontinued and that I did not know what caused this issue since I did not change anything besides the preparation for 2.0. The plugin has actually been cleaned up thoroughly with 2.0.One change I did make (I didn’t realize this first), and I mentioned this in the last post above yours, is that I updated one of the fonts, the one for the currency (did you use that setting?). It is possible that this needs to be reparsed (by the PDF conversion library) the first time the PDF is opened. I don’t run any update routines in the 1.6.6 update.
If you are using custom fonts, this could be affected too. Especially if you have the ‘Use old tmp folder’ option checked in the Status settings tab, every time you update the plugin, any custom fonts that you may use in your template will have to be reloaded.Again, I’m very sorry that you had to deal with this. Please also understand that I need information from you to know why this is happening. I’m not pointing at anyone else or any other plugins for this issue.
Did you try 2.0?
Let me know if you have any other questions and I’ll do my best to help!
Ewout
p.s. don’t forget that this is a free plugin!
-
This reply was modified 7 years, 8 months ago by
Ewout.
Hi Ewout,
thank you. I understand, that possibly it was the font. But I had the same problem with the update 1.6.5
I’m not the one who tests beta-versions. My website is no hobby-blog. I’m trying to use professional plugIns, that are beeing tested successful.
Surely this is a free plugIn, as many others I use. But it is the gate für you to advertise me and others. So if the free plugIn is professional and I have a good feeling with that, sometime I buy the premium version.
Daniel
Hello Daniel,
If you are using custom fonts and you have the ‘use old tmp folder’ option enabled, the font will need to be reinstalled every time you update the plugin (this option is deprecated in 2.0 which will always use the uploads folder for fonts and other temporary files, so that it shouldn’t have that issue).Are you using custom fonts or that setting “Extended currency symbol support”?
I asked you to try the beta because you asked for a fix. How else could I know whether a fix will work for you? I can tell you that this plugin is tested thoroughly for every update (the 2.0 update has been in beta for a few weeks already, making sure it works as smoothly as possible upon release). This plugin has 80.000+ users and just as many different configurations. Saying “it doesn’t work, please fix” doesn’t really help here, because if it works for 79.996 users but not for you I need to know first what’s different in your setup and how to replicate the issue.
For now, have a great weekend!
Ewout
Hi Ewout,
I do not use custom fonts and I also do not use the setting “Extended currency symbol support”.
Please be sure, that not everyone who has a problem, asks for support. Some pick another plugIn, some only read this forum.
I wish also a great weekend, and sorry for my bad english.
Daniel
When trying to generate a pdf invoice I get this error since last update:
Fatal error: Call to undefined method DOMText::getAttribute() in /var/www/vhosts/sitename/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/include/cellmap.cls.php on line 437Hello Globando,
This error is different from the error people in this thread reported (memory issues).
Can you enabled HTML output and Debug output on the Status settings to see if that gives you more information? the getAttribute error usually means there’s an error output in the template, it could be caused by an error of the PDF invoice plugin, customizations in your template or by other plugins, so I need a bit more information. There’s also a page in the documentation about this specific error: Fatal error: Call to undefined method DOMText::getAttribute()Let me know what you find and I’ll do my best to help!
Ewout
Hello Ewout and thanks a lot!
I’ve just enabled wp_debug and I returned this 2 messages:1.
NOTA: wp-includes/functions.php:325 – unserialize(): Error at offset 75 of 210 bytes
require_once(‘wp-admin/admin.php’), do_action(‘admin_init’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WooCommerce_PDF_Invoices_Settings->init_settings, WooCommerce_PDF_Invoices_Settings->get_wc_emails, WooCommerce->mailer, WC_Emails::instance, WC_Emails->__construct, WC_Emails->init, include(‘/plugins/woocommerce/includes/emails/class-wc-email-cancelled-order.php’), WC_Email_Cancelled_Order->__construct, WC_Email->__construct, WC_Settings_API->init_settings, get_option, maybe_unserialize, unserialize2.
NOTA: wp-includes/functions.php:325 – unserialize(): Error at offset 75 of 204 bytes
require_once(‘wp-admin/admin.php’), do_action(‘admin_init’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WooCommerce_PDF_Invoices_Settings->init_settings, WooCommerce_PDF_Invoices_Settings->get_wc_emails, WooCommerce->mailer, WC_Emails::instance, WC_Emails->__construct, WC_Emails->init, include(‘/plugins/woocommerce/includes/emails/class-wc-email-failed-order.php’), WC_Email_Failed_Order->__construct, WC_Email->__construct, WC_Settings_API->init_settings, get_option, maybe_unserialize, unserializeThank you again
Francesco -
This reply was modified 7 years, 8 months ago by
- The topic ‘PDF not showing or being created’ is closed to new replies.