When i Use tidy up in my installation, it gives me an erro:
/home/public_html/wp-content/plugins/tidy-up/tidy.linux -config /home/wp-content/plugins/tidy-up/wordpress.config
tidy | edit
1: Failed
Where is the error?
]]>Running OSX 10.6.8 and WP 3.4.2.
After installation, the executable tidy.osx does not have the
execute bit set, so it will never run.
If I manually set it e.g. chmod +x tidy.osx then
I get a segmentation fault when execution is attempted.
J
]]>Tidy Up report only gives messages like:
/volume1/www/wp_unix/wp-content/plugins/tidy-up/tidy.linux: line 1: syntax error: unexpected “(“
]]>html tidy executable installed with tidy up plugin is rather old, at least for OSX – recent binary (tested, works) is available at https://www.chipwreck.de/blog/2010/09/25/installing-a-current-version-of-htmltidy/
]]>tidy_console.php seems to be rarely used and contains some bugs…
* according to comments, $_SERVER[‘HTTP_HOST’] should be commented out – it isn’t
* at least while running under OSX/MAMP localhost as DB_HOST produced ‘error establishing database connection’ – solution was to add after (commented) $_SERVER[‘HTTP_HOST’] line:
define('DB_HOST', '127.0.0.1');
* tidy_run_posts / _comments needs offset and limit, like:
tidy_run_posts ($save, $input, $output, 0, 10000);
and… there should be also option for tidy_run_pages and tidy_run_excerpts
ALSO – $save = false; at the beginning needs to be changed to true if you want to have the changes written back into database ??
]]>wp 3.0.1, osx 10.6.4, mamp 1.9.2 has Tidy Up hanging while reading stderr – related to a particular post being cleaned (sometimes opening the post in WP, switching between visual and html editor and saving helps, sometimes not – could it be related to the length of error report? it seems to be light correllation with that)
tried everything, including compiling latest tidy from cvs, switching proc_open streams to binary, zero improvement…
found solution by switching error output to file (needs write rights in plugin dir) using following changes in tidy_class.php:
change the line that adds config to include also error output to file:
$tidy_command .= ' -m -config '.dirname (__FILE__)."/$config.config -f ". dirname (__FILE__). "/err.txt";
comment/remove lines that did the reading from stderr stream:
// while ($ret = fread ($pipes[2], 1024))
// $messages .= $ret;
… and after them add a command to read the $messages from err.txt:
$messages = file_get_contents (dirname (__FILE__)."/err.txt");
(seems to be a problem with stderr stream or tidy code – Tidy Up might offer an option to use file if stream fails; I can provide database dump if anybody is interested in further investigation)
]]>