Environment is:

Centos 6.0
Drupal 6.25
HTML Export 6.x-2.0-alpha5
simplehtmldom API 6.x-1.12
No organic groups

- Basic Drupal 6.25 install with two modules installed (mentioned above)
- No changes to the default config in 'Site configuration -> HTML Export'
- Selected all entries in 'Path selectors' and then hit 'Render as html'
- Return message is 'Export created 94 html pages and 0 files'

Problem - directories and files are created under sites/default/files/html_export/export????? but all index.htmlfiles are created with no content (size = 0).

CommentFileSizeAuthor
#7 htaccess.txt4.06 KBgary.moro
#7 httpd.conf_.txt33.69 KBgary.moro
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro’s picture

hmmmm. What's the site address, are clean URLs turned on, and what happens if you just select nodes as the thing to export

sfuora’s picture

Hi, I had the same problem,
I work with drupal 6.25 install on localhost, mac os X, powered with Mamp

In /all/modules/html_export folder,in the file html_export.pages.inc, at line 163, the path provided to drupal_html_request() is not correct. More precisely, the value of $root in html_export_render_pages() is "/", which is not correct.

My root instalation is http://localhost:8888/ ; Then I replace the lines:

//$http = drupal_http_request($root . $paths[$active]);
whith : $http = drupal_http_request("http://localhost:8888/" . $paths[$active]);
and
//$http = drupal_http_request($root .'index.php?q='. $paths[$active]);
whith: $http = drupal_http_request("http://localhost:8888/" . 'index.php?q='. $paths[$active]);

This changes fixes the issue.

However, another issue comes up.
If in a page .../node/3 ,I have an http link to ".../node/1", then this link is transformed whith the HTML_export into
/node/3/1 and raise a "file not found" error. It should be
/node/1

btopro’s picture

Thinking the issue might stem from my use of the #_SERVER["address"] property which might not be being set (how root is calculated). I think drupal_http_request requires a full url in order to process. Anyone know of a better way of verifying the site address that requested itself as the root to publish? I guess I could add a field to the UI to set the root manually and prepopulate it with whatever server value should (usually) work.

gary.moro’s picture

This is a development/sandbox site ... http://hgadmin.soe.ucsc.edu/ ... bound to change or go away over time.
Clean URLs are enabled. No change when selecting only nodes to export.

gary.moro’s picture

I support the group that manages the Human Genome Browser at UCSC. They would like to use Drupal for developing and managing content of their development site. They would then like to convert Drupal to HTML and push it to production. This module looks promising but my testing of it on a very basic Drupal 6.25 installation has not been successful. Any ideas? Thanks.

btopro’s picture

Possibly server value is not populated as per the comments above. I run this in production and localhost without issue so not sure without a lot more info.

gary.moro’s picture

FileSize
33.69 KB
4.06 KB

Not sure what specifically you mean by "#_SERVER["address"] property". I'm running apache and have set "ServerName hgadmin.soe.ucsc.edu:80" in httpd.conf. I've attached my htaccess and httpd.conf files for more info. Please let me know what else I can provide. Thanks.

btopro’s picture

Look for where that property is referenced in the module and hardcode your address and see if it works. Not all servers have that property set i'm finding and that's a large part of the issue. The module issues a drupal_http_request to the full address (which it needs) and basically spiders itself with "remote" requests coming from the site itself.

b.ravanbakhsh’s picture

I changed that line and worked for me.

$root = 'http://localhost'. base_path();

the installation located in some where in localhost

btopro’s picture

yeah, i think I need to make a way of setting that in the settings as to what the base address should be. I can guess at what it should be via the server value or some js trickery in the URL on page load but will still need to set it manually it appears to ensure that it works... I would want this to happen in the admin settings page and would accept a patch for it or I'll get to it at some point.

btopro’s picture

Version: 6.x-2.0-alpha5 » 6.x-2.x-dev

solution is now in git should publish to dev branch tomorrow. Now using global $base_url variable. You can set this in your sites's settings.php file to define the address for your site. HTML Export will then use this address to perform its query against. Have created multiple packages this way with web accessible addresses.