Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#7 | htaccess.txt | 4.06 KB | gary.moro |
#7 | httpd.conf_.txt | 33.69 KB | gary.moro |
Comments
Comment #1
btopro CreditAttribution: btopro commentedhmmmm. What's the site address, are clean URLs turned on, and what happens if you just select nodes as the thing to export
Comment #2
sfuora CreditAttribution: sfuora commentedHi, 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
Comment #3
btopro CreditAttribution: btopro commentedThinking 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.
Comment #4
gary.moro CreditAttribution: gary.moro commentedThis 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.
Comment #5
gary.moro CreditAttribution: gary.moro commentedI 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.
Comment #6
btopro CreditAttribution: btopro commentedPossibly 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.
Comment #7
gary.moro CreditAttribution: gary.moro commentedNot 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.
Comment #8
btopro CreditAttribution: btopro commentedLook 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.
Comment #9
b.ravanbakhshI changed that line and worked for me.
the installation located in some where in localhost
Comment #10
btopro CreditAttribution: btopro commentedyeah, 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.
Comment #11
btopro CreditAttribution: btopro commentedsolution 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.