Just noticed an error on my website after upgrading. http://seeberg.com/piwigo/
I did reupload the executables , and tried to repair the db. still getting the error
Warning: [mysql error 1054] Unknown column 'format_id' in 'field list'
INSERT INTO piwigo_history
(
date,
time,
user_id,
IP,
section,
category_id,
image_id,
image_type,
format_id,
auth_key_id,
tag_ids
)
VALUES
(
CURRENT_DATE,
CURRENT_TIME,
2,
'73.100.77.70',
'categories',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
)
; in /piwigo/include/dblayer/functions_mysqli.inc.php on line 832
Piwigo version: 2.8
PHP version: 5.3.6
MySQL version: 5.1.55
Piwigo URL: http://seeberg.com/piwigo/
Offline
Hi phantomracer,
Can you go in your database (with PhpMyAdmin or equivalent) and tell us your result for these SQL queries:
select * from piwigo_config where param = 'piwigo_db_version';
select * from piwigo_upgrade order by applied desc limit 5;
and what happens when you go on upgrade.php with your web browser?
Offline
Thanks for the reply.
here are the results of the queries:
select * from piwigo_config where param = 'piwigo_db_version';
piwigo_db_version 2.8 NULL
select * from piwigo_upgrade order by applied desc limit 5;
100 2012-12-11 18:36:24 upgrade included in installation
101 2012-12-11 18:36:24 upgrade included in installation
102 2012-12-11 18:36:24 upgrade included in installation
103 2012-12-11 18:36:24 upgrade included in installation
104 2012-12-11 18:36:24 upgrade included in installation
When i go to upgrade.php I get the following:
No upgrade required, the database structure is up to date
← back to gallery
Offline
I think the error says what the problem is. Just how to fix it... there is no column "Format_id".
Is the error in the program or the database table?
Field Type Null Key Default Extra
id int(10) unsigned NO PRI NULL auto_increment
date date NO 0000-00-00
time time NO 00:00:00
user_id mediumint(8) unsigned NO 0
IP varchar(15) NO
section enum('categories','tags','search','list','favorite... YES NULL
category_id smallint(5) YES NULL
tag_ids varchar(50) YES NULL
image_id mediumint(8) YES NULL
summarized enum('true','false') YES MUL false
image_type enum('picture','high','other') YES NULL
Offline
Any thoughts on why the history table (or the application) has incorrect field information?
Offline
Actually, you should see in table piwigo_upgrade the upgrade 145 to 148. In upgrade 146, we add piwigo_history.format_id new column.
Offline
Thanks.
so the upgrade didnt go right, i assume?
Is there a statement to run to add the missing column(s)?
Offline
* open files 145 to 148 in install/db
* check what has been done in the database
Offline
Thanks
executed
ALTER TABLE piwigo_history ADD COLUMN format_id int(11) unsigned DEFAULT NULL
seems to have fixed the problem. of course it makes me wonder if anything else has failed to execute during the upgrades over the years.
Offline
You also need to check that changes in other upgrade scripts were applied (I mean 145, 146, 147 and 148)
phantomracer wrote:
seems to have fixed the problem. of course it makes me wonder if anything else has failed to execute during the upgrades over the years.
If that was the case, you would have many other problems. You should consider past upgrades were fine :-)
Offline
true... one other script didnt run either.. but seems most/all have... im sure its fine now. seems to run well now
thanks for all your help
Offline
Moving from Debian 6 to Ubuntu 16.04 and upgrading fron Piwigo 2.5.7 to 2.8.3 I had same few errors like this and simple pasting of ALTER query didn't work.
Looking around I found that post, correlated to my issue:
http://piwigo.org/forum/viewtopic.php?id=25158
After trying (but fail) to disable STRICT_TRANS_TABLES I resolved typing:
ALTER TABLE `piwigo_history` CHANGE `date` `date` DATE NULL DEFAULT NULL;
then successfully was able to insert
ALTER TABLE piwigo_history ADD COLUMN format_id int(11) unsigned DEFAULT NULL; ALTER TABLE piwigo_history ADD COLUMN `auth_key_id` int(11) unsigned DEFAULT NULL;
Regards,
Mateusz
[Github] Piwigo issue #376
for mysql 5.7
but we are trying hard to comply with that Strict mode now by default on mysql 5.7
Offline
flop25 wrote:
but we are trying hard to comply with that Strict mode now by default on mysql 5.7
are we? (not me, actually ;-)
Offline