Exported pages empty

janwari - April 10, 2008 - 21:26
Project:HTML Export
Version:5.x-1.0-rc1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

When I try to export the nodes as flat html pages by going to admin>settings>html_export the module creates an export123232..... folder and inside it contains various modules, themes, images etc. All these are exported without any problem. But the html page itself is empty (i.e size zero)

Has anyone else faced similar issues ??

#1

btopro - April 14, 2008 - 09:20

hmm.. that's a new one to me, got a few questions:

What exact version of drupal are you using?

Are you using path alias'ed nodes?

What kind of server are you using? (own hosting, local dev, or another company)

The only thing I can think of off the top of my head is that maybe there isn't enough memory in order to complete the operation (it can get pretty intense). Otherwise there's probably some error going on when it replaces things in each page. I'll look into that when I get a chance, there are some issue with string replacing.

#2

janwari - April 14, 2008 - 15:34

My version of Drupal is 5.7
Im using pathauto aliased nodes

Am working on a local dev environment where I have a VMware VM installed with the following config:
RAM Allocated: 512MB
OS: CentOS 5
Webserver: Apache 2
PHP: version 5
MySQL: version 5

The weird thing is that it exports the images and scripts without any problem its only the html pages that are empty.

#3

btopro - April 15, 2008 - 03:03

Well, the images and CSS are selected using a copy directory command that just copies everything in all the directories I know to look in (like files, modules, themes, sites, etc) and then just ignores all the files it doesn't need. The html pages are then rendered by running the following line:

drupal_http_request($root . base_path() . "index.php?q=node/" . $node['nid']);

Root is compiled from this command $root = substr($_SERVER['HTTP_REFERER'],0,strpos($_SERVER['HTTP_REFERER'],base_path()));

Possibly those vars aren't being set correctly and so when it goes to do the http request it's getting nothing... I'll try and find a better way of accomplishing this in a newer version.

#4

btopro - April 22, 2008 - 06:33

I believe I fixed the issue, it stemmed from drupal installs not being nested within a folder structure. I'm a bit bogged down with some other projects at the moment but I should be releasing a beta two in two weeks or so. Sorry for the delay.

#5

janwari - April 23, 2008 - 08:47

Could I get a working copy of the module before April 27th ??

#6

btopro - May 6, 2008 - 19:08

Hopefully i'll get to look into this project next week. Didn't see your comment before, lot of other responsibilities here then this project and the summer will give me some more free time to put towards our open projects.

#7

EllECTRONC - May 6, 2008 - 23:17

And me too....... the exported pages are incorrect! HTML files not absolutely empty - 143b, but all files have the same content:

<html>
<head>
<title>Redirect on a service site of...<title>
<meta http-equiv=Refresh content="0; url=one_word">
<head>
<html>

Tags not closed!!!
Drupal 5.7, the module version the latest. I think it because I use a virtual host drive (local), but I do not know how it to correct.
I'm using: Apache 2.2.4; PHP 5.2.4; MySQL 5
And pathauto!

#8

btopro - May 7, 2008 - 15:26

I have had problems in the past with making it work on a local install. Pathauto also doesn't work yet but it should still render out the pages they just won't link together correctly. Thank you for posting your settings, if anyone else has issues please do this going forward. I believe i've fixed the issue of local rendering but haven't been able to commit / clean it up yet. Hopefully soon...

#9

jackspiv - May 13, 2008 - 15:09

I think I may have the same (or similar problem)

blocks and theme render fine, but no internal links on menus work at all. (external links do)
no page content displayed
login functionality doesnt work (this may be related to above or might be the reason for it?)

FWIW this is on the following configuration:

Drupal 5.3
Configuration file Protected
Cron maintenance tasks Last run 1 week 1 day ago
You can run cron manually.
Database schema Up to date
Docs document manager Configuration correct
File system Writable (private download method)
GD library bundled (2.0.34 compatible)
JQuery Update Installed correctly
The current installed version of JQuery is 1.1.2
MySQL database 5.0.45
Organic groups modules Organic groups works best when job_queue.module.module is enabled. See the Integration section of the README file.
PHP 5.2.5
Unicode library PHP Mbstring Extension
Web server Apache/1.3.37 (Unix) mod_choke/0.07 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.4mm

#10

btopro - May 13, 2008 - 16:08

I haven't figured out how to render a logged in view. If anonymous can't view the page content that's one issue that could be causing it. All pages will pub as anonymous, I think this might be a limitation of the drupal function that I call for rendering a page but...I also could just be uninformed about how to do it correctly.

#11

btopro - May 14, 2008 - 18:01

I just created a new beta, hopefully with this issue of "publishing" empty pages fixed. It's still only anonymous but I think I got the issue isolated and fixed, let me know.

#12

btopro - May 17, 2008 - 02:04
Status:active» fixed

#13

ajayg - May 25, 2008 - 17:47
Status:fixed» active

Just tried Beta 2 and still having the same problem.

#14

btopro - May 26, 2008 - 17:41

:\ could you please give me some stats about your site (address, clean urls on or off, url aliases on or off, localhost or webserver?). Unit testing seems a bit tricky for this project because of all the potential variables...

#15

ajayg - May 26, 2008 - 18:56

localhost (using xampp on my windows desktop) SO sorry can't give the address.
clean urls : on

#16

btopro - June 5, 2008 - 16:55
Status:active» fixed

#17

ajayg - June 6, 2008 - 01:16
Status:fixed» active

Sorry Still does not work. Got a white screen of death. When I tried to go back in browser and found that it has created all the directories fine but choking on while exporting node(page) files. It had created 3 empty pagennnn.html files. I tried this multiple times and monitored memory but it was NOT running out of memory (using about 55% memory out of 2 G). I uncommented line 121 "drupal_set_message($root . "index.php?q=node/" . $node['nid']);" and it printed the debug message only 3 times (but that too you can only if you go back). I always got white screen of death. I had frontpage setup to a panel page to I setback fronpage to default "node" still with no luck.

#18

btopro - June 6, 2008 - 03:58
Version:5.x-1.0-beta1» 5.x-1.0-rc1

What is your location for the site (full path) to the HTML export page?
What does the debug message say those three times it prints when you uncomment line 121?
Are you doing anything with path auto?
Are any of your path's to virtual folders?

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?

#19

ajayg - June 6, 2008 - 05:16

it is on my local pc (under xampp)
I don't have saved the debug message. But it basically printed what it was supposed to (like sitepath/index.php?q=node/4310) and it was printed 3 times (once for each empty html file created)

I don't have path auto although I am using the core path module to redefine some page names sometimes.

No none of the paths were in virtual folders.

#20

dschild - June 9, 2008 - 23:05

Same problem here. Message I get reads:

* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: dir(D:\web\loftliqueurs.comfiles) [function.dir]: failed to open dir: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 190.

#21

dschild - June 9, 2008 - 23:09

So I created the folders specified in the error. Now I get:

HTML Export

* The directory files/html_export/export1213052926 has been created.
* The directory files/html_export/export1213052926/files has been created.
* The directory files/html_export/export1213052926/sites has been created.
* The directory files/html_export/export1213052926/modules has been created.
* The directory files/html_export/export1213052926/themes has been created.
* The directory files/html_export/export1213052926/misc has been created.
* If you don't see any errors the site was exported successfully! Click here to access the export.

* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: mkdir() [function.mkdir]: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 186.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/14.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/13.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/12.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/11.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/10.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/9.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/8.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/7.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/6.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/5.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/4.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/3.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/2.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926//index.php?q=node/1.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 142.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 144.
* warning: fopen(D:\web\loftliqueurs.comfiles/html_export/export1213052926/index.html) [function.fopen]: failed to open stream: No such file or directory in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 167.
* warning: fclose(): supplied argument is not a valid stream resource in D:\web\loftliqueurs.com\modules\html_export\html_export.module on line 169.

#22

btopro - June 10, 2008 - 06:47

hmmm... a few questions (though this is very helpful):
*Is your website stored in D:\web\loftliqueurs.com ?
*Do you have write access set up correctly to the files directory in Drupal?

It wants to publish everything out to yousite/files/html_export/export{DATESTAMP}/... so if you haven't set privs correctly you'll get those errors you saw before. It looks like there might be an issue with the path (as they all seem to be :\ ). After I get the above answers it might help though unfortunately I will be away from the internet for the next two weeks shortly.

#23

dschild - June 10, 2008 - 16:55

*Is your website stored in D:\web\loftliqueurs.com ?
-- Yes--

*Do you have write access set up correctly to the files directory in Drupal?
-- I'm not sure what those should be. --

Where could I look to fix the path?

#24

dschild - July 15, 2008 - 17:00

Hi BTOPRO, just wondering if you were back from your vacation and could take a look at this again.

#25

btopro - July 15, 2008 - 17:20

I've finally finished upgrading all our sites so I'll take a look at the module again. What i'll do is modify path writing so that if it finds a / or \ it'll convert it to -. This will change things from node/mypage/cool/5 to node-mypage-cool-5.html

I realize most people want folder paths generated but to at least get it working i'm going to swap things out with -. It's also very difficult to make it 100% portable if things are nested in folders.

#26

btopro - July 15, 2008 - 19:44
Version:5.x-1.0-rc1» 5.x-1.0-rc2

Try RC2 and let me know if this accomplishes what you want. I'll keep this patch in mind and maybe someone will want to implement it in the future but as of right now there are no plans to push things out to physical folder paths. With all the issues unresolved floating around this project this will only make things worse. Please try RC2 and let me know if it meets your needs.

#27

btopro - July 15, 2008 - 19:46
Version:5.x-1.0-rc2» 5.x-1.0-rc1
Status:active» fixed

#28

Anonymous (not verified) - July 31, 2008 - 04:46
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.