Closed (fixed)
Project:
Import HTML
Version:
5.x-1.2
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2007 at 14:44 UTC
Updated:
12 Nov 2007 at 22:42 UTC
The module couldn't detect my tidy dll.
It couldn't reach the test-function on install-htmltidy.inc, to include the page it should be like:
include_once drupal_get_path('module', 'import_html') . '/install-htmltidy.inc';
This solves the problem.
Comments
Comment #1
dman commentedI guess you are talking about line 364 in import_html_admin_settings()
...
At the top of the module, the PHP include_path was set to make that happen naturally.
I'm curious why that wouldn't work for you.
Can you please print out your get_include_path() before and after those two lines?
and in fact your version looks like it would have it searching for the inc file inside the import_html directory, while it should actually be getting it from
import_html/coders_php_library/install-htmltidy.incAlthough (!) I see there is a 16-month-old version of that file up there too! Gosh, that's a bit wrong, but I see why that would seem to work for you. Must have been some CVS mistake, it should have been removed from the distro long ago. the one inside coders_php_library/ is the one you should be using.
Comment #2
thierry.beeckmans@drupal.org commentedI'm working with php5.2.3 and phpinfo() shows the tidy extension.
The path is correct: sites/all/modules/import_html/coders_php_library;.;c:\Program Files\php\PEAR;c:\Program Files\php\includes
So the function is reached (checked it and bumped into the problem)
Apparently the problem lies in the htmltidy_test function.
There's a check to hack php4 which claims that the tidy extension is loaded.
Although I'm working with php5, a var_dump of the eval function returns bool(false) and of $tidy returns NULL
Good news, I just found what caused the problem, a forgotten ';' :
line 40 says @eval('$tidy = new tidy()');
replace this with @eval('$tidy = new tidy();');
greetings
Comment #3
thierry.beeckmans@drupal.org commentedI noticed the file install-htmltidy.inc was in the root directory, and the functions in there didn't work, I thought: 'the path is wrong'.
In that particular file there isn't a check against php4, claiming the extension is loaded.
Because of that my adjustment, to locate the file in the modules dir, worked.
Comment #4
thierry.beeckmans@drupal.org commented* changed title
Comment #5
dman commentedI am bemused that you found the extra semi-colon was needed, or that it fixed anything for you. I think I'd have to damage my system a bit in order to test it (the test currently was running correctly for me) so I'll take your word for it!
The php4 problem has been slightly better identified as the difference between the functional and the OO versions of the extension, so I added a little bit more explanation there.
new tidy();(OO version) would fail, althoughfunction_exists('tidy');(PECL version) may work. aarg.So I've just added and committed that change - it can't hurt. :)
Thanks, I guess ;-)
Also (I hope) removed traces of that incorrect inc from the upper directory.
I'll call this issue 'fixed' then, although there may still be inconsistancies for some versions of some PHP distros on some platforms with some dated version of some branch of the tidy extension. :-}
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.