Announcement

#1 2023-02-07 16:46:48

BigIsland270972
Member
Norway
2022-03-15
374

[resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Hello/Hi/Greetings,

What can cause this?

https://www.fotoarkiv.no/priv/hohen.png

Piwigo URL: http://fotoarkiv.no


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 2023-02-07 16:50:00

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Code:

( ! ) Warning: [mysql error 167] Out of range value for column 'id' at row 1 INSERT INTO `piwigo_tags` (`name`,`url_name`) VALUES('Hohenzollern','hohenzollern') in /hd1/var/www/virtual/fotodb.net/arkiv/include/dblayer/functions_mysqli.inc.php on line 847
Call Stack
#  Time  Memory  Function  Location
1  0.0000  389848  {main}( )  .../admin.php:0
2  0.2874  1140816  include( '/hd1/var/www/virtual/fotodb.net/arkiv/admin/batch_manager.php )  .../admin.php:345
3  0.7617  4977080  include( '/hd1/var/www/virtual/fotodb.net/arkiv/admin/batch_manager_global.php )  .../batch_manager.php:814
4  0.7621  4988456  get_tag_ids( $raw_tags = [0 => 'Hohenzollern'], $allow_create = ??? )  .../batch_manager_global.php:110
5  0.7621  4988544  tag_id_from_tag_name( $tag_name = 'Hohenzollern' )  .../functions.php:2816
6  0.7735  4989968  mass_inserts( $table_name = 'piwigo_tags', $dbfields = [0 => 'name', 1 => 'url_name'], $datas = [0 => ['name' => 'Hohenzollern', 'url_name' => 'hohenzollern']], $options = ??? )  .../functions.php:1756
7  0.7741  4990096  pwg_query( $query = '\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')' )  .../functions_mysqli.inc.php:550
8  0.7743  4990144  my_error( $header = '\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')', $die = FALSE )  .../functions_mysqli.inc.php:132
9  0.7744  4990336  trigger_error( $message = '[mysql error 167] Out of range value for column \'id\' at row 1\n\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')', $error_type = 512 )  .../functions_mysqli.inc.php:847

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

 

#3 2023-02-07 17:50:08

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Further investigation leads me to think ID number in MariaDB Piwigo database has a LIMIT set to 65535 items.
Shit.

https://www.fotoarkiv.no/priv/smallint.png

Last edited by BigIsland270972 (2023-02-07 17:50:39)


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

 

#4 2023-02-07 19:02:39

erAck
Only trying to help
2015-09-06
2027

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Yes, tag id smallint(5) unsigned is limited to 64k. As are category id and group id.
You maybe could get away with changing
* table piwigo_image_tag `tag_id`
* table piwigo_tags `id`
both to mediumint(8) unsigned, which would allow for values up to 16777215.
Maybe, because I don't know if there's code that assumes max uint16 values.


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

Offline

 

#5 2023-02-07 19:23:31

k5
Member
2017-11-05
68

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Hello
yes if there is more than 1.6M there is the possibility at 4 294 967 295 with INT()
just replace this in mariadb.

Offline

 

#6 2023-02-07 20:02:00

erAck
Only trying to help
2015-09-06
2027

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Actually it'd be more than 16M, but I'd guess if one had more tags than that there'd be more urgent problems than getting even more tags..


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

Offline

 

#7 2023-02-07 20:12:40

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

erAck wrote:

Yes, tag id smallint(5) unsigned is limited to 64k. As are category id and group id.
You maybe could get away with changing
* table piwigo_image_tag `tag_id`
* table piwigo_tags `id`
both to mediumint(8) unsigned, which would allow for values up to 16777215.
Maybe, because I don't know if there's code that assumes max uint16 values.

Thanks for the reply. What SQL query will convert the table type from smallint to mediumint or bigint??

Best regards
Robert

Last edited by BigIsland270972 (2023-02-07 20:13:13)


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

 

#8 2023-02-07 20:40:36

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Never mind. I found a solution using phpmyadmin.

THANKS to ALL!

RESOLVED.

Cheers

Last edited by BigIsland270972 (2023-02-07 20:41:59)


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

 

#9 2023-02-08 13:13:53

BigIsland270972
Member
Norway
2022-03-15
374

Re: [resolved] Not able to add TAGS trough Admin UI Piwigo 13.5.0 anymore

Just a quick NOTE. If anybody encounter this problem in the future don't hesitate to contact me for the   instructions.
Best regards
Robert


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

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