Re: [Libki-Users] Error message: Unknown column 'location'
Brought to you by:
kylemhall
|
From: Ian W. <ia...@by...> - 2026-09-16 16:08:11
|
Sean, Since Libki 26.05, Locations have been made a more primary data object in Libki, which in turn has led tables like 'clients' to link to 'locations' with a primary key instead of a string. This has required a lot of retrofitting across Libki of this very problem you're describing. This looks to be one of the places where the update didn't get applied, most likely because the public admin page was also updated to use the API V2 endpoint for clients instead of /api/public/datatables/clients legacy endpoint. If you're still trying to consume from that endpoint, I think that's what will lead to the error you're seeing. Ian On Tue, Sep 15, 2026 at 3:41 AM Sean Carte <sea...@gm...> wrote: > Since upgrading to r26.08.01, I notice a lot of these messages in the > libki_server.log: > > DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st > execute failed: Unknown column 'location' in 'where clause' [for Statement > "SELECT COUNT( * ) FROM `clients` `me` WHERE ( ( `instance` = ? AND > `location` = ? AND `status` = ? ) )" with ParamValues: 0='', 1="Indumiso > Research Commons", 2='online'] at > /home/libki/libki-server/lib/Libki/Controller/API/Public/Datatables.pm line > 69 > > Even in a new installation, the clients table does not have a location > column: > > DESCRIBE clients; > +-----------------+--------------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default | Extra | > +-----------------+--------------+------+-----+---------+----------------+ > | instance | varchar(32) | NO | MUL | | | > | id | int | NO | PRI | NULL | auto_increment | > | name | varchar(191) | NO | | NULL | | > | location_id | int | YES | MUL | NULL | | > | status | varchar(191) | YES | | online | | > | type | varchar(191) | YES | | NULL | | > | ipaddress | varchar(191) | YES | | NULL | | > | macaddress | varchar(191) | YES | | NULL | | > | hostname | varchar(191) | YES | | NULL | | > | last_registered | timestamp | YES | | NULL | | > +-----------------+--------------+------+-----+---------+----------------+ > 10 rows in set (0.01 sec) > > Should that be 'location_id' in Datatables.pm line 69? > > Sean > _______________________________________________ > Libki-Users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libki-users > -- *Ian Walls* *Head of Special Projects* ByWater Solutions <http://bywatersolutions.com> Phone: (888) 900-8944 *pronouns*: (he/him) *timezone*: Eastern <http://bywatersolutions.com> Follow us: <https://www.facebook.com/ByWaterSolutions/> <https://www.instagram.com/bywatersolutions/> <https://www.youtube.com/user/bywatersolutions> <https://twitter.com/ByWaterSolution> <https://linkedin.com/company/bywater-solutions> |