Image file name size limitation ?

Open to all! Ask other shopowners for help.
Post Reply
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Image file name size limitation ?

Post by wal »

Some of my products can have long file names. I would like to retain them for SEO but find 64 characters or more is not allowed in the (old) V1.0.8.3 I use with PHP 8.1.16
It truncates the file name and displays a "Image does not exist" warning when trying to add stock.

I have tried changing the products_images to varchar(128) in the database, but this did not help. (File names are not this long.. lol) - and I'm guessing this would be the correct variable to modify ..

Is there a limitation somewhere in the Phoenix files that I haven't found yet ?

Your thoughts & responses will be appreciated.

cheers, wal


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4547
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Image file name size limitation ?

Post by burt »

The furthest back I could easily see is v1.0.4.5 where the products.products_image is set to varchar(255) as is products_images.image set to varchar(255). Your database is malformed or an older osc database which you have not updated correctly maybe?

You should update both tables to 255, sounds like you are changing the products_images table but not the products table.
I am not here to build for you.
I am here to build with you. Let's help each other.
wal
Member
Posts: 25
Joined: Sun Mar 14, 2021 2:02 am
Phoenix Version:
Has thanked: 26 times
Been thanked: 1 time

Re: Image file name size limitation ?

Post by wal »

Thank you Burt - I had missed the products.products_image table altogether. The database had been updated with all the changes to V1.0.8.3 but the two tables were still varchar(64), so changing only the products_images table was the problem. With both tables amended the problem has been resolved.
I'll have to owe you a beer until I can afford one for myself - then we'll have a beer together :lol:
Your help is really appreciated
cheers, wal


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply