I just noticed the following bug in Visforms which only occurs on systems with mysql versions lower than 5.5 and
if the option "Result text" is set in the form configuration.
A user will then get an error 1305 FUNCTION [Datenbank].CHAR_LENGTH does not exist after the form was submitted.
The bug is due to an incompatible mysql statement. I will fix the bug with the next Visforms version. In the meantime you can try the following fix.
Open the file router.php in components/com_visforms.
In line 195 - 220 you find the following code
Code:
if (strpos($segment, ':') !== false)
{
$query = $db->getQuery(true);
$query->select('CASE WHEN CHAR_LENGTH (name) THEN CONCAT_WS(":", id, name) ELSE id END as slug');
$query->from('#__visforms');
$db->setQuery($query);
$slugs = $db->loadColumn();
if (!empty($slugs))
{
foreach ($slugs as $slug)
{
if ($segment === $slug)
{
$form = explode(':', $segment);
$vars['id'] = $form[0];
if ($count == 2)
{
$vars['view'] = 'message';
}
continue;
}
}
}
//we should not arrive here
}
Please replace it with:
Code:
if (strpos($segment, ':') !== false)
{
list($id, $name) = explode(':', $segment, 2);
$query = $db->getQuery(true);
//$query->select('CASE WHEN CHAR_LENGTH (name) THEN CONCAT_WS(":", id, name) ELSE id END as slug');
$query->select($db->quoteName( 'name'));
$query->from('#__visforms');
$query->where($db->quoteName('id') . ' = ' . (int) $id);
$db->setQuery($query);
$slug = $db->loadColumn();
if (!empty($slug))
{
if ($slug === $name)
{
$vars['id'] = $id;
if ($count == 2)
{
$vars['view'] = 'message';
}
}
}
//we should not arrive here
}
Make a backup copy of the original file before you make the changes, just in case. Please let me know, if this fixes the problem.
Regards,
Aicha