This isn’t exactly a support request, as I was able to make stuff work, but I thought I should bring it to your attention because it seems…weird.
I was having a problem with the Order Confirmation PDF, it looked great as a web page, but when I clicked “Download PDF” it came out missing all images and formatting. Here’s what it looked like, web page vs PDF: https://imgur.com/a/HHyXSYs
I found another similar support thread which said “it looks like allow_url_fopen has been disabled on your server” but I checked and that was not the case.
Eventually the solution I found was to un-check a setting in iThemes Security, under Banned Users > “Enable HackRepair.com’s ban list feature”.
With HackRepair.com’s ban list feature disabled, the PDF works perfectly, all images and formatting present. If I enable it again, it goes back to broken. Very strange. I have enough other security measures active, and PDFs are working, so my case needs no urgent attention, but it seems like something that shouldn’t happen, perhaps there is something there that should be addressed, and hopefully this will be helpful if anyone else is experiencing the same problem.
Thank you for the report, we’ve actually seen this before and it’s from the HackRepair list using this rule:
RewriteCond %{HTTP_USER_AGENT} "^$" [NC,OR]
Which blocks any requests with no user_agent set.
With DOMPDF it uses get_file_contents() to pull ‘external’ files into the PDF (images, CSS etc) and that function will use the user_agent set on your servers php.ini file, which based on the above, is likely empty so then gets the request blocked.
One option is to update your php.ini file to include a valid user_agent value, or you can whitelist the above before the HackRepair rule is set, see:
The support post ‘Found an odd conflict, Event Espresso generated PDFs and iThemes Security…’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.