HTML Export

  • Directory files/html_export/export1212532852 was created.
  • Directory files/html_export/export1212532852/files was created.
  • Directory files/html_export/export1212532852/sites was created.
  • Directory files/html_export/export1212532852/modules was created.
  • Directory files/html_export/export1212532852/themes was created.
  • Directory files/html_export/export1212532852/misc was created.

If you don't see any errors the site was exported successfully! Click here to access the export.

And when I do click to view files/html_export/export1212532852/index.html I see "Page Not Found"
Yes, all created directories is exist! But pages yet is incorrect! (beta1, beta2)

What I do wrong? What U did wrong?

I attach couple of files from export folder! All they are identical...
P.S.: denwer is on localhost

Status report
Drupal 5.7
Database schema Up to date
File system Writable (private download method)
GD library bundled (2.0.34 compatible)
MySQL database 5.0.45
PHP 5.2.4
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro’s picture

I have an extremely similar setup so i'm not sure what the problem could be... I'm posting a slightly updated version of the module, let me know if that helps anything. Another thing - does your site allow anonymous access to node content? If not that could also cause nothing to happen in those pages.

EllECTRONC’s picture

Version: 5.x-1.0-beta2 » 5.x-1.0-beta3

Yes, my site allow anonymous access to node content!
beta3: All the same - "Page not found" and the same content of exported page.

Besides, the tags is not closed. It's why?

May be u have some different PHP or Server (Apache) parameters?
May be, it also depend on some modules?

btopro’s picture

Ok i'm getting there. I've been able to recreate the issue. If you don't have Drupal within a sub-directory it's not finding the pages correctly. I've been testing everything off of http://localhost/os_elms which then it does work. I'll run a trace to try and figure out how to fix it.

btopro’s picture

Ok, I tracked it down. Pens game is on now though so I'll finish it up tomorrow. It should be resolved by tomorrow though, thank you so much for keeping me posted on the issue as I have been trying to fix it for some time but couldn't replicate. A lot of the issue stems from clean vs. non-clean URLs and accounting for both.

btopro’s picture

K, i've got it working base path or no base path. I've also got it working with or without URL aliasing. The issue currently is that I can't get it working with clean URLs turned on. So, what I think i'm going to do is flip them off in the database before doing the export, then turn it back on when they are all rendered.

Again, should be up tomorrow.

btopro’s picture

Status: Active » Fixed
EllECTRONC’s picture

Status: Fixed » Active

Don't hurry up!

I've tested... it's no matter with clean URLs turned on or turned off.
Also no matter where installed Drupal in domain or subdomain.
And my Drupal site is placed not in subdirectory.

I just don't know what else to do!

P.S.: I'm testing with Denwer.
Sorry, seems it exist in russian version only. The base is Denwer3 for Windows.

btopro’s picture

Status: Active » Fixed

Please don't set it back to active until you try the new version, I'm creating one right now so don't set it back until that one doesn't work.

EllECTRONC’s picture

Sorry, I just have not noticed the new version. And this issue to 5.x-1.0-beta3.
I'll try new.

EllECTRONC’s picture

Version: 5.x-1.0-beta3 » 5.x-1.0-rc1
Status: Fixed » Active
FileSize
33.68 KB

Almost Fixed! Yeah, but what this is:

warning: fopen(files/html_export/export1212704451/story/blok_news.html)
[function.fopen]: failed to open stream: No such file or directory in www\sites\all\modules\html_export\html_export.module on line 142.

warning: fwrite(): supplied argument is not a valid stream resource in www\sites\all\modules\html_export\html_export.module on line 143.

warning: fclose(): supplied argument is not a valid stream resource in www\sites\all\modules\html_export\html_export.module on line 144.

If shortly, in result I just got index.html and images_pages.html (all images).
Aliases for image is '/image-number.html' and this is great was exported, and with '/image-number' it works!
But for other content I have such aliases: '/content_type/node_title.html', I've changed this to '/content_type/node_title', but it no helped.

Menu items of exported files have URL paths without an '.html'.

Thus I do a conclusion, that HTML Export still NOT LETS me export my drupal site to static HTML.

Pathauto is on!

You know it would be magnificent, if your module allowed to change the coding of exported files from UTF on ANSI! See attached image!

Fix it please!

btopro’s picture

I just realized that if there are path aliases that are things like "bluebunny/10/20" that it will try to find "bluebunny/10/20.html" even though that doesn't exist cause it's looking for all of that as a filename. Hence, I need to remove slashes though that may not be your issue. Do you have php writing errors to the screen?

The way this algorithm works is that it replaces all matches of the node's link in each file with the alias'ed link. If the alias'ed link looks like it's in a folder then it will try to LOOK in that folder when it's published to HTML, even though all html files are supposed to sit in one location.

This shouldn't be too hard to fix, thanks for pointing out the aliasing issue, I wouldn't have picked up on that. I should be able to send out a modification of those tomorrow.

EllECTRONC’s picture

If shortly, was exported the files which had simple URLs like a "image-10.html".
Files with long URLs like a "booboo/10/20.html" wasn't exported.
By the way, if I have path aliases like a "booboo/10/20" it means that the module should create folders "booboo" and "10" and put there file "20.html". But nothing similar has been done!

jinside’s picture

Examining the URL Alias and creating full directory structures on the file system is an enhancement and from what I can tell is not supported in the current feature set. We may want to create a separate issue to capture all the requirements for the enhancement your talking about.

btopro’s picture

The issue that I have with the way you're describing is that everything that's currently published out is path relative to the folder it sits in. So, all nodes are published to soemthing like cool.html or page120.html . These can then easilly find everything that's in folders above them. If you start taking node/20/mypage.html and pushing it out to that some path as a physical folder path, come up with an easy way in which you can trace your way back to the references, files, styles, images, all located relative to the root.

Keeping everything is CRITICAL in this project because it keeps your htmlexport completely relative and portable so that you can rename, move, remove the name of the file / location it sits in and your site will always look the same.

EllECTRONC’s picture

LOL....

"Download Master" is the best htmlexporter that I used. After export by such way:
I create new directories,
I move some files,
I rename many-many links.

So tell me now whether I need your project? Sorry, but it really doesn't work as htmlexport! To save few pages in one folder with all styles and images, I can use "Save as" in browser menu.

All the best!

EllECTRONC’s picture

Yep? Yep! Yep...

EllECTRONC’s picture

double

btopro’s picture

Status: Active » Fixed

Try RC2 and let me know if it works...and please stop spamming this issue / project.

EllECTRONC’s picture

Version: 5.x-1.0-rc1 » 5.x-1.0-rc2
Status: Fixed » Active
FileSize
4.46 KB
5.35 KB

As well as last time pages have been exported not all! Besides, CSS is not applied to pages.
<link rel="stylesheet" href="/themes/aberdeen/print.css" media="print" />
But for a static site it should be:
<link rel="stylesheet" href="../themes/aberdeen/print.css" media="print" />
and etc. for all links...

AND IT HAPPENS AGAIN:

    * warning: fopen(files/html_export/export1216979436/lohotron/fishing_poddelnyi_sait.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/lohotron/lokhotron_po_pochte_spam.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/story/blok_news_s_pomoshchyu_views_versiya_alfa_2_min.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/snip/index.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/lohotron/lokhotron_v_vide_rab.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/lohotron/lokhotron_v_vide_oby.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/mails/hotmail.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/mails/pochta_mailru.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.

    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/mails/pochta_gmail.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/mails/pochta_na_yandex.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2008-03-08.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2008-03-01.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2007-05-02.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2007-04-15.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2007-04-10.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.
    * warning: fopen(files/html_export/export1216979436/news/2007-04-09.html.html) [function.fopen]: failed to open stream: No such file or directory in ..\path\to\html_export\html_export.module on line 142.
    * warning: fwrite(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 143.
    * warning: fclose(): supplied argument is not a valid stream resource in ..\path\to\html_export\html_export.module on line 144.

That I've got via html_export.module:see attachment exp02.gif
That I've got if I do it manually: see attachment exp03.gif

btopro’s picture

Ok ok, try Version 1.0 I'm very sorry bout I didn't associate RC2 to the updated file correctly. This problem IS solved in version 1.0

EllECTRONC’s picture

No errors!
But I cannot understand for what the modules folder and all subfolders in it, even empty; also files of translation (po/lang.po), and other empty folders is exported.

And again css styles are not applied:
<style type="text/css" media="all">@import "/themes/name/style.css";</style>
instead of:
<style type="text/css" media="all">@import "themes/name/style.css";</style>
and etc.

And instead of site/a/b.html --> site/a-b.html, it prevent link "more" (at blocks) to work, because this link go to site/a.html...

Thanks for attention!

P.S.: U can mark this post as "closed" if u wish. I already use some off-browser to solve this task.

iceaxe’s picture

Version: 5.x-1.0-rc2 » 5.x-1.0-rc1

when i run html export, it shows me a blank page with nothing on it.
when i click back on my firefox, and back to my main page. it shows

* The directory files/html_export/export1235132822 has been created.
* The directory files/html_export/export1235132822/files has been created.
* The directory files/html_export/export1235132822/sites has been created.
* The directory files/html_export/export1235132822/modules has been created.
* The directory files/html_export/export1235132822/themes has been created.
* The directory files/html_export/export1235132822/misc has been created.

when i go to that folder, i didn't see any html files. but i manage to see rest of the files in that folder.

any kind soul can help me with this?? i'm running latest html export and using Xamp.

thanks

btopro’s picture

Version: 5.x-1.0-rc1 » 6.x-2.0-alpha1
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.