Announcement

#1 2016-03-20 02:51:20

phantomracer
Member
2013-03-06
30

post upgrade error - history

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

 

#2 2016-03-21 13:22:26

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

any idea?

Offline

 

#3 2016-03-21 13:55:50

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: post upgrade error - history

Hi phantomracer,

Can you go in your database (with PhpMyAdmin or equivalent) and tell us your result for these SQL queries:

Code:

select * from piwigo_config where param = 'piwigo_db_version';

Code:

select * from piwigo_upgrade order by applied desc limit 5;

and what happens when you go on upgrade.php with your web browser?

Offline

 

#4 2016-03-21 22:25:00

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

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

 

#5 2016-03-22 03:13:00

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

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

 

#6 2016-03-25 13:17:09

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

Any thoughts on why the history table (or the application) has incorrect field information?

Offline

 

#7 2016-03-25 13:29:52

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: post upgrade error - history

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

 

#8 2016-03-25 13:37:37

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

Thanks.

so the upgrade didnt go right, i assume?

Is there a statement to run to add the missing column(s)?

Offline

 

#9 2016-03-25 13:41:44

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: post upgrade error - history

* open files 145 to 148 in install/db
* check what has been done in the database

Offline

 

#10 2016-03-25 13:56:07

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

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

 

#11 2016-03-25 15:13:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: post upgrade error - history

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

 

#12 2016-03-26 01:32:13

phantomracer
Member
2013-03-06
30

Re: post upgrade error - history

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

 

#13 2016-11-28 02:23:07

Mateusz
Guest

Re: post upgrade error - history

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

Code:

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

 

#14 2016-11-28 10:51:47

flop25
Piwigo Team
2006-07-06
7037

Re: post upgrade error - history

[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


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2016-11-28 11:45:16

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: post upgrade error - history

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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact