Hello,
I'm using ChronoConnectivity v1.2 and Joomla 1.5.7.
While trying to edit some records at backend everything is ok. Unfortunately when I'm trying to add a new record an error occur:
The error doesn't depend on the table. It seems that ChronoC tries to insert an additional field to my table. This field is called 'ordering'. I really don't know where does it come form. My record edit template is shown below:
If anyone can tell me where can I find the part that insert fields into database in the source code, I can search for it and try to change it on my own. Thank You for this great component!
I'm using ChronoConnectivity v1.2 and Joomla 1.5.7.
While trying to edit some records at backend everything is ok. Unfortunately when I'm trying to add a new record an error occur:
Table pmdg_trenerzy::store failed - Unknown column 'ordering' in 'field list' SQL=INSERT INTO `pmdg_trenerzy` ( `id_trener`,`imie`,`nazwisko`,`ordering` ) VALUES ( '0','aaa','aaa','' )
The error doesn't depend on the table. It seems that ChronoC tries to insert an additional field to my table. This field is called 'ordering'. I really don't know where does it come form. My record edit template is shown below:
<?php
$editor =& JFactory::getEditor();
?>
<table>
<tr>
<td>Imię:</td>
<td><input type="text" name="imie" id="imie" size="100" value=""></td>
</tr>
<tr>
<td>Nazwisko:</td>
<td><input type="text" name="nazwisko" size="100" value=""></td>
</tr>
</table>
<input type="hidden" name="id_trener" value="">
If anyone can tell me where can I find the part that insert fields into database in the source code, I can search for it and try to change it on my own. Thank You for this great component!
Hi misku,
did you add the ordering field to the ordering text box at the admin config tab of the connection ? if not then this may be a bug, try to find this code in admin.chronoconnectivity.php:
comment this code and see if it helps ?
Let me know!
Regards
Max
did you add the ordering field to the ordering text box at the admin config tab of the connection ? if not then this may be a bug, try to find this code in admin.chronoconnectivity.php:
if(!$post[$primary]){
$row->ordering = $row->getNextOrder();
}
comment this code and see if it helps ?
Let me know!
Regards
Max
Hi Max,
I didn't add the ordering field to the ordering text box. It turns out we've found a bug 😀 Commenting these lines helped and now everything works great.
Thank You for Your help. If I run against any problems, I certainly will let You know. I'm pleased to use such helpful module for free.
Best regards,
misku
(Poland)
I didn't add the ordering field to the ordering text box. It turns out we've found a bug 😀 Commenting these lines helped and now everything works great.
Thank You for Your help. If I run against any problems, I certainly will let You know. I'm pleased to use such helpful module for free.
Best regards,
misku
(Poland)
Hi misku,
ok, we found the bug, commenting is not the best solution, lets do this now and tell me teh effect, replace the 3 lines with this:
let me know how this works!
Regards
Max
ok, we found the bug, commenting is not the best solution, lets do this now and tell me teh effect, replace the 3 lines with this:
if(trim( $paramsvalues->orderingname)){
if(!$post[$primary]){
$row->ordering = $row->getNextOrder();
}
}
let me know how this works!
Regards
Max
It should work as it tests if the argument is empty and it was in my example. And... yes it works🙂
You could tell me to add just an IF condition😉
Thank You very much.
You could tell me to add just an IF condition😉
Thank You very much.
Thanks for reporting back!🙂
Had the same issue, and that worked for me as well.
Hi misku,
ok, we found the bug, commenting is not the best solution, lets do this now and tell me teh effect, replace the 3 lines with this:
if(trim( $paramsvalues->orderingname)){
if(!$post[$primary]){
$row->ordering = $row->getNextOrder();
}
}
let me know how this works!
Regards
Max
Max:
I think the same change is needed in chronoconnectivity.php. I ran into this same error tonight with my "almost ready for live site" front end. Applying the change in chronoconnectivity.php fixed the problem.
George
Thanks George, fixed this too!
Regards
Max
Regards
Max
This topic is locked and no more replies can be posted.