Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
Re:[solved] DB function failed with error number 1 (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Re:[solved] DB function failed with error number 1
#52441
[solved] DB function failed with error number 1054 3 Months, 2 Weeks ago  
DB function failed with error number 1054
Unknown column 'g.id' in 'on clause' SQL=SELECT a.*, a.name AS category, u.name AS editor, g.name AS groupname, h.name AS admingroup FROM jos_fb_categories AS a LEFT JOIN jos_users AS u ON u.id = a.checked_out LEFT JOIN jos_core_acl_aro_groups AS g ON g.id = a.pub_access LEFT JOIN jos_core_acl_aro_groups AS h ON h.id = a.admin_access GROUP BY a.id ORDER BY a.ordering, a.name

when trying to edit categories. All works fine on localhost, but online I get this error.

Joomla 1.0.15
FireBoard 1.0.4

local:
Windows NT LAPTOP 5.1 build 2600
Database Version: 5.0.37-community-nt
PHP Version: 5.2.2
Web Server: Apache/2.2.4 (Win32) PHP/5.2.2

online:
PHP built On: Linux vps12 2.6.18-6-xen-686 #1 SMP Thu Apr 24 12:29:00 UTC 2008 i686
Database Version: 5.0.32-Debian_7etch5-log
PHP Version: 5.2.0-8+etch11
Web Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c
carsten888 (User)
Junior Boarder
Posts: 44
graphgraph
User Offline Click here to see the profile of this user
Gender: Male safe login
Logged Logged
 
Last Edit: 2008/06/24 18:53 By carsten888.
 
The administrator has disabled public write access.  
#52443
Re:DB function failed with error number 1054 J1.0. 3 Months, 2 Weeks ago  
solved!

version:
fireboard 1.0.4

file:
administrator/components/com_fireboard/admin.fireboard.php

line:
382

Code:

 
$database->setQuery("SELECT a.*, a.name AS category, u.name AS editor, g.name AS groupname, h.name AS admingroup"
    . "nFROM #__fb_categories AS a"
    . "nLEFT JOIN #__users AS u ON u.id = a.checked_out"
    . "nLEFT JOIN #__core_acl_aro_groups AS g ON g.".((FBTools::isJoomla15())?"":"group_")."id = a.pub_access"
    . "nLEFT JOIN #__core_acl_aro_groups AS h ON h.".((FBTools::isJoomla15())?"":"group_")."id = a.admin_access"
    . "n GROUP BY a.id"
    . "n ORDER BY a.ordering, a.name");



change to

Code:


if( defined('_JEXEC') ){
//joomla 1.5
$group_id_col_name = 'id';
}else{
//joomla 1.0.x
$group_id_col_name = 'group_id';
}

    $database->setQuery("SELECT a.*, a.name AS category, u.name AS editor, g.name AS groupname, h.name AS admingroup"
    . "nFROM #__fb_categories AS a"
    . "nLEFT JOIN #__users AS u ON u.id = a.checked_out"
    . "nLEFT JOIN #__core_acl_aro_groups AS g ON g.$group_id_col_name = a.pub_access"
    . "nLEFT JOIN #__core_acl_aro_groups AS h ON h.$group_id_col_name = a.admin_access"
    . "n GROUP BY a.id"
    . "n ORDER BY a.ordering, a.name");



works on both joomla 1.0.15 and 1.5 !

problem is in this code:
Code:


((FBTools::isJoomla15())?"":"group_")



which is suppose to return '' for joomla 1.5.x and 'group_' for joomla 1.0.x (because they reamed that column), but somehow does not. the above code does the same, but works.

open source rulez!

@fireboard team:
please include this code in your next release.
carsten888 (User)
Junior Boarder
Posts: 44
graphgraph
User Offline Click here to see the profile of this user
Gender: Male safe login
Logged Logged
 
Last Edit: 2008/06/24 18:54 By carsten888.
 
The administrator has disabled public write access.  
#52458
Re:DB function failed with error number 1054 J1.0. 3 Months, 2 Weeks ago  
Can you please attache the full file that includes the fix?

Thx!
fxstein (Moderator)
FB Core Team
starVmax
Moderator
Posts: 1170
graphgraph
User Offline Click here to see the profile of this user
Gender: Male fxstein starVmax Location: Silicon Valley, USA
Logged Logged
 
 
The administrator has disabled public write access.  
#52479
Re:[solved] DB function failed with error number 1 3 Months, 2 Weeks ago  
in attachment the complete file with the fix.
Make a back-up of your old file before overwriting it with this one!




version:
fireboard 1.0.4

file:
administrator/components/com_fireboard/admin.fireboard.php


File Attachment:
File Name: admin-3f3917645e2a08ef567fef7c3048f865.zip
File Size: 20248


carsten888 (User)
Junior Boarder
Posts: 44
graphgraph
User Offline Click here to see the profile of this user
Gender: Male safe login
Logged Logged
 
The administrator has disabled public write access.  
#52518
Re:[solved] DB function failed with error number 1 3 Months, 2 Weeks ago  
Thx!
fxstein (Moderator)
FB Core Team
starVmax
Moderator
Posts: 1170
graphgraph
User Offline Click here to see the profile of this user
Gender: Male fxstein starVmax Location: Silicon Valley, USA
Logged Logged
 
 
The administrator has disabled public write access.  
Go to top