Viljami Kuosmanen
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress PDF Templates] nothing is being displayd in PDF[marked topic as resolved]
Forum: Plugins
In reply to: [WordPress PDF Templates] Preview works, but pdf is blankI’ve just updated the plugin to version 1.3.8, with a patch to the aforementioned issue. See if updating the plugin will help.
Forum: Plugins
In reply to: [WordPress PDF Templates] Preview works, but pdf is blankHard to say. I’ve never run into this issue. Look at your php error log to see if there’s anything interesting in there.
define('DISABLE_PDF_CACHE', true);didn’t work either?Forum: Plugins
In reply to: [WordPress PDF Templates] Preview works, but pdf is blankHmm, did you try to hard refresh the page? Try sending no-cache headers to the script by cmd + shift + R (ctrl + F5 on windows) to make sure the blank pdf file hasn’t been cached.
You can also try setting
define('DISABLE_PDF_CACHE', true);in your wp-config.phpForum: Plugins
In reply to: [WordPress PDF Templates] Preview works, but pdf is blankHi!
Make sure you have turned WP_DEBUG off and display_errors is set to 0. In production environments, you generally shouldn’t have those set anyways.
Hope this helps.
– Antti
Forum: Plugins
In reply to: [WordPress PDF Templates] nothing is being displayd in PDFHi, Jeroen
You need to customise the template to display your custom fields. By default, WP PDF Templates only displays the title, post content and the page URL in the PDF.
Copy index-pdf.php from the plugin directory to your theme directory and recreate your product page layout in html there. Alternatively, find your product page template file and append -pdf to the name and edit as needed.
Let me know if you need further assistance.
Cheers!
– Antti
Forum: Plugins
In reply to: [WordPress PDF Templates] Preview works, but pdf is blankThanks for checking out our plugin!
This is a small bug that has already been fixed in the next release version of the plugin. In the meantime, you should disable warning messages on production sites with
error_reporting(E_ERROR | E_PARSE);in your wp-config.phpSorry for the inconvenience. The final fix for this came into existence just over the weekend.
Cheers!
Forum: Plugins
In reply to: [WordPress PDF Templates] fopen wrappers and file_get_contents()A pull request with a patch would be very appreciated! Please do submit one if you find the time. I’ll be sure to merge and update the plugin with your patch so that your changes are retained for future updates.
Thanks for trying out our plugin,
Cheers!
Forum: Plugins
In reply to: [WordPress PDF Templates] fopen wrappers and file_get_contents()There’s no workaround as of yet, but we sure would like to include one in the project! I’ve never encountered this limitation myself, so there hasn’t really been a need for one.
I do admit however that using
file_get_contentsis inherently ugly, and initially we did want to avoid its use. There didn’t seem to be a simple non-hacky way to completely render a WordPress post from template and store it in a separate output buffer without initiating a complete request heap. Simplest way to do this is via a http request to WordPress.You could always create a curl implementation, to circumvent the missing file_get_contents issue. This would be very welcome.
Feel free to pull-request us with a patch on GitHub!
https://github.com/Seravo/wp-pdf-templatesI’m keeping this thread open for further discussion.
Forum: Plugins
In reply to: [WordPress PDF Templates] WP PDF Templates on WordPress MUGlad to be of assistance!
[marked topic as resolved]
Forum: Plugins
In reply to: [WordPress PDF Templates] WP PDF Templates on WordPress MUYou mean you’ve network enabled the plugin? That should still work. Although, it’s not smart enough to update the pretty URLs automatically for each site. ?pdf should work even then.
Could you try going to Settings > Permalinks and just clicking the Save -button? Does that make a difference?
– Antti
Forum: Plugins
In reply to: [WordPress PDF Templates] WP PDF Templates on WordPress MUThanks for checking out our plugin!
The 404 error would suggest that the plugin is not properly activated on the site.
We have the plugin working on a WordPress MU installation, so that’s not an issue.
I’m afraid I’m going to need a bit more information to help you with this. Could you give me an example of a URL with the 404 error present?
Cheers!
Forum: Plugins
In reply to: [WordPress PDF Templates] Cookies & ContextHi, blueocean!
My bad. I didn’t take into account the $_COOKIE array can apparently contain arrays as values, not just strings. This caused a PHP warning to be triggered, and with display_errors set to 1 in your php.ini, the error was echoed right onto the PDF file output, corrupting it.
I released a patch for this in 1.3.7. Just update the plugin and this should be fine.
Sorry about the inconvenience.
Forum: Plugins
In reply to: [WordPress PDF Templates] Cookies & ContextAfter reading up a bit on cookie encoding it looks like the cookie values should always be URL encoded, but not the keys. This alone wouldn’t solve your problem as the function was in the key, not the value.
To fix this I made it so that any cookies that contain non-ascii characters in their key portion, are simply not passed on at all, which should help avoid these situations.
Here’s the patch https://github.com/Seravo/wp-pdf-templates/commit/e11da5cc3ddb8781bf648fc75061a76d78de8c14
Updating the plugin on wordpress.org now…
Thanks for your help finding this!
Forum: Plugins
In reply to: [WordPress PDF Templates] Multiple Pages[marked this topic as resolved]