Manual talk:$wgUseTidy

Example Tidy Configuration File
It appears that a valid configuration file for Tidy is required, using the default installed on a server either doesn't work or it has the incorrect settings. So a valid one needs to be provided. The error noted below was due to this. The configuration file used is noted below (located at /extensions/tidy/tidy.conf), which was found at. Ensure that the Manual:%24wgTidyConf is correctly set to the location of the configuration file.

show-body-only: yes force-output: yes tidy-mark: no wrap: 0 wrap-attributes: no literal-attributes: yes output-xhtml: yes numeric-entities: yes enclose-text: yes enclose-block-text: yes quiet: yes quote-nbsp: yes fix-backslash: no fix-uri: no

Breaking HTML Code
I have enabled UseTidy on my wiki and it has broken some of the HTML generated to display pages. It is influencing the coding associated with displaying images. Initially I thought it was only to do with the RandomImage extension, but now know that it effects every single image that is displayed in the wiki.

What appears to be happening is that some of the opening and closing tags of the code is generated as & gt; or & lt;. Which then means that things fail, get funny bits of code appearing on the page etc. The code was working fine before enabling $wgUseTidy.

An example of the coding that now appears incorrectly on the pages is as follows. Not sure how to make it not convert the code to a > though. It is on the end of this line: ".... nsitional.dtd" & gt;".

   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"& gt; < /pre > 4,500 K

If interested, reason for using UseTidy can be found here: Meta-Wiki: Talk: ParserFunctions: Further HTML Tables Problems

This is on an intiallation of MediaWiki 1.8.2 --Dr DBW 23:53, 7 December 2006 (UTC)


 * Further information, it appears that this only effects image coding that is generated by the gallery tag or the RandomImage extension. Normal images within the pages is fine.  So it appears that the code made by those two parts, something is wrong that causes the Tidy script to cause problems. --Dr DBW 22:14, 19 December 2006 (UTC)


 * This is still an issue. Anyone with suggestions on what to try, where to ask, who etc? --Dr DBW 22:59, 8 February 2007 (UTC)


 * Upgraded to 1.9.3 and the problem still occurs --Dr DBW 23:48, 27 February 2007 (UTC)


 * Have submitted a bugzilla for this issue http://bugzilla.wikimedia.org/show_bug.cgi?id=9235 --Dr DBW 02:59, 9 March 2007 (UTC)


 * SOVLED !!! This is an issue due to not being able to find a configuration file, or not having a valid configuration file in use. --Dr DBW 03:38, 13 March 2007 (UTC)

What an absolutely maddening problem! I've been working on this exact same problem for two days before finding this page. A big thanks to everyone who found the solution. Todd 6, April, 2007.


 * You have got that right. Anyway, with some further releases coming up, a default configuration file is going to be included in the distribution, it is noted in the bugzilla above if interested. --Dr DBW 04:48, 12 April 2007 (UTC)

Parser.php Error
Some of my templets & codes were breaking the page. I was trying to fix this problem last couple of days but not yet solved. As a last hope I used following to my local setting page: $wgUseTidy=true; $wgTidyBin = '/usr/bin/tidy'; $wgTidyConf = $IP.'/extensions/tidy/tidy.conf'; Now, my page looks ok but showing following error Warning: proc_open [function.proc-open]: open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/home:/tmp:/usr) in /home/.../public_html/includes/Parser.php on line 759

Warning: proc_open(/dev/null) [function.proc-open]: failed to open stream: Operation not permitted in /home/.../public_html/includes/Parser.php on line 759 What went wrong? Please help me to slove this problem. Thanks.--Usingha 02:36, 18 October 2007 (UTC)