• Resolved dreamkatcha

    (@dreamkatcha)


    It would be useful if you could export individual pages or select all the ones in certain categories. Would that be possible at all?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    That is a good idea, and one that I am considering for the next version.

    In the middle of another project, so won’t be able to get to it for at least a week, though.

    Thanks for the suggestions.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Just to let you know…the latest version (1.10, uploaded last week) will let you select multiple categories of posts to export (default is all posts). Hope that is useful to you.

    If the plugin is useful to you, please add a review. If you have any other suggestions, let me know here in a new topic.

    Thread Starter dreamkatcha

    (@dreamkatcha)

    Brilliant news, thanks very much. 🙂

    Just tried the updated version and noticed a couple of issues – the plugin generates the page inside a frame, so if you were to save the output it would include the WP menu on the left hand side, which isn’t ideal. Also many centred images are being shifted to the left, while some stay put. I can’t fathom why so many HTML to PDF converters/print-friendly tweakers have so much trouble with that.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    The plugin doesn’t do any ‘framey’ things. It just queries the database, then outputs each post’s title, date, and content, each in individual H-tags.

    Once the file is generated, you should see a dialog box to allow you to open/save the generated content. If you select Open, it will use your default browser to open a new window. All you should see is each post, with it’s title, date, and content.

    If you save the file, you can decide where to save it; the file name is a combination of the current date/time plus a few characters in front, it is an HTML file by default. Images have minimal formatting/css, and should be flush left. Each generated element (title, date, content, image) has a class attached to it so you can add your CSS (the classes used are on the Settings page).

    So, unsure how you are getting a frame, and the menu/theme stuff. Have you tried saving the file to your local drive, then opening from there? Perhaps your browser is showing new/clicked links in a frame? (I use FireFox, and have new links opened in a new tab.)

    If you look at the generated file’s source code, you shouldn’t see any of your theme/menu/etc.

    Let me know the results of your testing.

    Thread Starter dreamkatcha

    (@dreamkatcha)

    Thanks for your help. I tried again but the output still includes the WP menu to the left. ‘Frame’ was perhaps the wrong word… it’s not an iframe or anything like that. I wasn’t given an option to save the file and then the plugin gave up generating the file in my browser. Maybe it’s too much to ask to load it all at once. Some of my articles are massive with dozens of pictures.

    Oh, a useful addition would be to export all posts by a particular author. That would come in very handy for shared blogs like mine. Just an idea.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    I usually test the plugin on a smallish site of mine, and it always works well. But I can see with a ‘large’ site (lots of posts) that there might be a timeout issue.

    So I tested the plugin with a ‘large’ site, and it did indeed not finish. That indicates a timeout error that is not caught. So I added the following code to the top of the blog-to-html.php file

    ini_set('max_execution_time', 300); //300 seconds = 5 minutes

    And ran it again on the ‘large’ site, and all worked as designed (I got the save/open dialog box at the end).

    So, if you could, try adding that code line to the top of the blog-to-html.php file on your site (somewhere just before the first php code line; not in a commented area).

    Let me know how it works for you. If it fixes the problem, then I’ll add it to the next version.

    Thanks for your patience and help.

    Thread Starter dreamkatcha

    (@dreamkatcha)

    I gave that a go and WordPress accepted the modification to the code, but when I ran the script on the first occasion the page eventually went blank. When I tried again the process ran to the end displaying my latest article, but many of the pictures were missing and I wasn’t given an option to download the output.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Perhaps your browser settings are set to automatically save the file, rather than giving you the Save As / Open dialog box? The file that is created is called blogexport*.html ; perhaps a search for that file pattern will find the file?

    If you use Firefox, this article explains how to change what happens when the Save As / Open dialog box is ‘called’: https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file .

    When the process runs, there is no visual indication that something is happening, other than a possible/probable ‘spinner’ on the browser’s tab (like you get when a page is loading). Only when the file is completed do you get the open/save as dialog box.

    If your settings are set to automatically save, then you might not see that dialog box. But the blogexport*.html file should be somewhere on your computer.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Hmmm…just tested it on another site (medium-size). I did get the output to the screen, with the plugin header (title) and version number on top. Interesting.

    So, now I have a good place to test things,since I can duplicate the problem. Maybe a theme code getting in the way? Who knows. More later.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    After many hours of testing different things, I think that I have fixed the problem with the exported output appearing on the screen, rather than the Open/Save As dialog box. I still need to do some more testing on a few different sites, though.

    And, I added a new feature that allows you to have the generated HTML file emailed. Thought that might be useful. Plus the 1.10 update that allowed selection of specific categories of posts.

    So, I need to do some final testing. Have another commitment tomorrow that will take most of the day, but hope to have the 1.20 version uploaded tomorrow (Fri) evening.

    Thanks for your patience.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    I just uploaded version 1.20, which should fix your problem. In addition, you can now email the generated HTML file if you want, rather than the Open/SaveAs dialog box.

    Hope this works for you. Spent a lot of time testing it on a few of my sites, including the one that I was able to duplicate the error. Sorry it took so long to fix it, but the problem was quite obscure.

    Let me know how it works for you.

    …Rick..

    Thread Starter dreamkatcha

    (@dreamkatcha)

    Well I admire your dedication! It’s paid off too because this version works perfectly, thanks very much for all the time and effort you’ve put into rooting out the problem. 🙂

    When I get back to a proper computer I’ll see if Chrome can convert the file to a PDF. With all the pictures it’s going to be huge! If not I’ve got the HTML that will serve as an effortless way to backup my entire collection of articles in an easily readable format with one mouse click. If Chrome can handle it I’ll save the web page as a single MHTML archive.

    I’ll be sure to leave you a five star review.

    Thread Starter dreamkatcha

    (@dreamkatcha)

    Now I’m back home I’ve had a proper change to check the output file. Turns out it managed to export the bulk of my blog but stopped a few months short of the 22 month run.

    I converted what I had to PDF using Chrome easy enough and the file was 760mb. Neither Chrome or IE were able to save the file in their own single file archive format. They said they’d got the job done, but no file was produced. Then that’s not your fault or under your control. I suppose you’ve got to expect these kind of problems when using such massive web pages.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Hmmm…possibilities include a server process timeout, or maybe a browser timeout.

    Do you know the values of PHP max_execution_time and PHP Memory Limit on your server (you can find it via your php.ini file, or using the <?php phpinfo(); ?> command in a little PHP file on your server. Might also be able to find it via your site’s host CPanel.

    You could also check the error_log file in the wp-content folder to see if there is an error message.

    Did you try using the email function to email the file? That might give you the whole file without having to ‘bother’ the browser waiting for the SaveAs dialog.

    I’ve been thinking about a date range or record count range for the next version. But the timeout and memory settings and any error message might be helpful to determine what the problem is.

    Thanks for your patience.

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    …and on the chance that browser timeout or server memory is the problem; version 1.21 (just uploaded) now increases the browser timeout to 5 minutes, and increases memory available to the program to 256M.

    I tested 1.21 on a blog with 1300+ posts, and output to Open/Save As dialog worked (although it did take a while to open). Also tried it with mailing, and there may be an issue there….although the mail command did work, I never got the email. Could be a mail server setting, though.

    Let me know how 1.21 works. Thanks.

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘All or nothing?’ is closed to new replies.