Elxis CMS Forum
Extensions => Components => Topic started by: muharihar on January 16, 2009, 17:36:50
-
i found this error on com_sections while trying to delete (remove) section.
oci8 Error [1722] : EXECUTE
URI: index2.php
Message: ORA-01722: invalid number
SELECT s.id, s.name, COUNT(c.id) AS numcat FROM sie_sections s LEFT JOIN sie_categories c ON c.section=s.id WHERE s.id IN (3) GROUP BY s.id, s.name
i'm try fix it by adding some modification:
from: (file: administrator/components/com_sections/admin.sections.php, function removeSections, line: 346)
$query = "SELECT s.id, s.name, COUNT(c.id) AS numcat FROM #__sections s";
if ($pg) {
$query .= "\n LEFT JOIN #__categories c ON c.section=s.id::VARCHAR";
} else {
$query .= "\n LEFT JOIN #__categories c ON c.section=s.id";
}
to:
$ordrivers = array('oci8', 'oci805', 'oci8po', 'oracle');
$query = "SELECT s.id, s.name, COUNT(c.id) AS numcat FROM #__sections s";
if ($pg) {
$query .= "\n LEFT JOIN #__categories c ON c.section=s.id::VARCHAR";
} if (in_array($database->_resource->databaseType,$ordrivers)){
$query .= "\n LEFT JOIN #__categories c ON c.section= TO_CHAR(s.id)";
} else {
$query .= "\n LEFT JOIN #__categories c ON c.section=s.id";
}
modification:
$query .= "\n LEFT JOIN #__categories c ON c.section= TO_CHAR(s.id)"; --> TO_CHAR : oracle function -> convert number to string/varchar
happy try 8)
-
Oracle support in Elxis 2008.1 is experimental. We will try to fix all these issues in 2008.2.
Did the above fix solved the issue? if yes, tell me to add it to SVN (unfortunately I have not an Oracle installation available right now so I can not test it).
-
It solved the issue and it's work for me. ;D
btw, where is SVN link? can i upload to SVN to?
-
Fixed, thank you very much.
Only Elxis Team and some Elxis Community members have access to Elxis SVN, sorry.