#1 2022-10-20 18:36:26

BigIsland270972
Member
Norway
2022-03-15
374

[mysql error 1054] Unknown column 'user_agent' in 'field list'

Hello.  After upgrading to piwigo 13 i got this msg. when I sync.

  Warning:  [mysql error 1054] Unknown column 'user_agent' in 'field list'

INSERT  INTO `piwigo_activity`
  (`object`,`object_id`,`action`,`performed_by`,`session_idx`,`ip_address`,`details`,`user_agent`)

Piwigo 13.0.0 '
    Installert på 11 april 2020, 2 år 6 måneder 1 uke 1 dag siden
    Operativsystem: Linux
    PHP: 7.4.32 (Vis informasjon) [2022-10-20 15:20:22]
    MySQL: 5.5.5-10.3.28-MariaDB [2022-10-20 17:20:22]
    Grafikkbibliotek: External ImageMagick 6.9.12-64
    Cache størrelse 1570.7 Mo   kalkulert 6 måneder siden Oppdater


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#2 2022-10-20 21:04:54

erAck
Only trying to help
2015-09-06
2236

Re: [mysql error 1054] Unknown column 'user_agent' in 'field list'

Your upgrade is incomplete, the user_agent column should had been added by the upgrade process that apparently did not run or not complete. You could try to point your browser logged in as admin to the YOURSITE/upgrade.php and see if that runs anything.

If it just tells "No upgrade required" then you could try to edit table `piwigo_upgrade` and delete the record with `id`=164 and if table `piwigo_user_infos` does not have column `preferences` then delete 163 as well, those are the two db upgrades that should had been executed for 12.0.0 to 13.0.0 (`description` contains "migration from 12.0.0 to 13.0.0"). It'd be odd though if the records were there but the modifications weren't done. If you upgraded from an earlier version proceed with earlier ids accordingly. Then run upgrade.php again.

Alternatively inspect all relevant to the upgrade install/db/*-database.php files and tweak the database manually using the correct SQL statements. For the `user_agent` column of install/db/164-database.php that would be

Code:

ALTER TABLE `piwigo_activity` ADD COLUMN `user_agent` varchar(255) default NULL

and for `presence` of install/db/163-database.php

Code:

ALTER TABLE `piwigo_user_infos` ADD COLUMN `preferences` TEXT default NULL

Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-10-21 13:42:29

BigIsland270972
Member
Norway
2022-03-15
374

Re: [mysql error 1054] Unknown column 'user_agent' in 'field list'

Thanks


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

Board footer

Powered by FluxBB