Hello --

I'm getting the following errors when attempting to save a Page using an enabled HTMLTidy module (the error DOES NOT appear when previewing the page, but code errors are noted and displayed in green):

Location http://localhost/drupal6/node/7/edit
Referrer http://localhost/drupal6/node/7/edit
Message Missing argument 3 for form_set_value(), called in /etc/drupal/6/sites/all/modules/htmltidy/htmltidy.module on line 281 and defined in /usr/share/drupal6/includes/form.inc on line 1321.

I'm using version 6x 1.2, and the Linux tidy binary is installed in /usr/bin/tidy. The HTMLtidy configure "Path" section reports that:

HTMLTidy is present and correct:
HTML Tidy for Linux/x86 released on 7 December 2008

Enter the full path to htmltidy. e.g. /usr/local/bin/tidy
/usr/bin/tidy

and yet there is also the following error messaged logged in the Reports section:

Location http://localhost/drupal6/node/7/edit
Referrer http://localhost/drupal6/node/7/edit
Message Failed to find htmltidy executable at '', not using tidy.
Severity warning

I'm running Drupal 6.12 on an Ubuntu 9.10 server, installed from the Ubuntu Repository into /etc/drupal/6, with an AMP stack also installed from the standard Ubuntu Karmic repository.

Thanks in advance for any assistance or ideas.

Comments

michaelfavia’s picture

Let me roll a couple patches in and have you retest.

lanelib’s picture

Hello again --

I just downloaded and installed htmltidy 6.x-1.x-dev (last activity April 2, 2010, so I assume this is the patched version??) and while I still get the "Missing argument ..." error, the page does in fact save and become active. Previously the error message would stop the edit cold and abort the process of creating a story or page.

Since HTMLTidy is a major component of the Import HTML module that I need for helping to convert an existing static site with thousands of pages, this needs to work. I am certainly open to creating a Drupal site under another flavor of Linux or even a WAMP stack. If anyone reading this knows of a confirmed configuration that runs both the HTMLTidy and Import HTML modules without a hitch, please let me know. I'm also open to the possibility (probability) that I've missed a crucial setting somewhere in my Ubuntu localhost test bed.

Many thanks ...

mrangryfish’s picture

I am also having this problem. The page saves at least now with dev.

warning: Missing argument 3 for form_set_value(), called in /var/www/drupal/trunk/sites/all/modules/htmltidy/htmltidy.module on line 278 and defined in /var/www/drupal/trunk/includes/form.inc on line 1321.

Changing that line from:

form_set_value(array('#parents' => array('body')), $clean);

to:
$temp_array = array();
form_set_value(array('#parents' => array('body')), $clean, $temp_array);

Stops the warning from happening and doesn't appear to have any bad effects.. but it is perhaps a bit of a hack. Hope that helps someone!

safetypin’s picture

Here's some info about this function, and how to use it: http://api.drupal.org/api/drupal/includes--form.inc/function/form_set_va...

I think it sounds like this third argument can/should be an empty array unless a specific task needs to be performed on the form. It seems like this really should be getting the $form_state array, but it's not clear to me if this form state array exists inside this function.

michaelfavia’s picture

Status: Active » Fixed

Fixed in dev pushed to 1.3.

Status: Fixed » Closed (fixed)

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