Open mikebakke opened 4 years ago
@Dillon-Brown even though it's true these are just NOTICEs I think the amount is so high it would merit a fix. It's likely this even impacts performance. What do you think?
@Dillon-Brown even though it's true these are just NOTICEs I think the amount is so high it would merit a fix. It's likely this even impacts performance. What do you think?
I think every notice merits a fix :D. I'm not really sure what the best way to go about tracking areas that need specific attention is though.
Maybe this one can simply be re-opened. It has steps to reproduce, and among the many notices we should fix, this one seems particularly aggressive in the number of messages generated...
The errors in the logs are
PHP Notice: Undefined index: assigned_user_id_address_street in /var/www/html/embee/modules/AOS_PDF_Templates/templateParser.php on line 162
This appears once for each field, 6725 times.
And
PHP Notice: Undefined property: User::$authenticate_id in /var/www/html/embee/modules/AOS_PDF_Templates/templateParser.php on line 124
Which also appears once for each field, total 1251 times.
And then there are other various sequences with PDF_Lib errors...
For that first error (line 162), sometimes it seems to be concatenating this way
fieldName_fieldName
instead of the expected
moduleName_fieldName
The latter case makes more sense, but also produces the warning, though.
I was dealing with the same problem after upgrading from 7.9.x to 7.10.19 and I did some backports into our CRM to fix them. I also opened #7899 and #7900, though I don't remember if that was specifically relevant to the PDF exporting.
We backported #6375 to our 7.10.19 install about 3 weeks ago and it seems to have fixed a lot of these errors, and AFAIK hasn't introduced any new problems. It'd probably be worth updating that PR and getting it merged.
The mPDF update also helps fix most of the remaining notices/warnings (#7948), though we haven't tested that one as much, and haven't deployed our backport of it yet.
Issue
Every time an invoice is printed and saved as PDF I see up to 10,000 warnings/notices written to my apache error.log. The PDF file is generated correctly.
Expected Behavior
Actual Behavior
Possible Fix
Steps to Reproduce
Context
This is flooding my error.log with messages which are not (apparently) causing any issue. The impact is twofold.
Your Environment
NOTE: Although identified on a live system - I recreated with a virgin install this morning from the distribution so I believe this is as clean as system as one could have. The diagnostics and sample error log are from that fresh install.
Updated: 16:40 UTC Thanks to a response on the forums I'm told that the majority of these are notices which need not cause concern. After adding ~E_NOTICE to php.ini, the message count for the print transaction reduced to c50 lines of warnings. Adding ~E_WARNING removes those too however it seems that they may mask genuine warnings so for now I will leave.
Will close for now.