• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.

Categories bug 3.4.2

Status
Not open for further replies.

Si5m

Chevereto Member
There is a bug (sort of) in 3.4.2 were if you don't have any categories set, you get a SQL error message when you try to upload an image.
The image is still uploaded, but not entered into the database.

A posible fix/addition, if the admin doesn't want to use categories on his/her website, or the user doesn't want to categorise the image that is being uploaded, make it so you have a "no category" option like "explore/All"
 
Si5m,
I'm unable to replicate the problem on my end.
I just created two categories ... test and test2.
I uploaded an image, and didn't choose a category. At this point, I was hoping to see the error message.

However, the image uploaded fine. I didn't receive any SQL error message? Maybe I'm missing something?
 
If you don't set any categories you get the upload error.
I tried to add a test category it worked fine. My point is some web masters might not want to use categories and then make it default back to no category
 
I don't use any categories on my site, and I don't get the error.
I've added / removed / done all sorts, and I still can't replicate the error ?

Try it yourself, let me know.
www.ultraimg.com
 
I didn't get an error on you site but on my website, if I remove all the categories and then try to upload an image i get an error

Code:
ZGRbj.gif - SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'undefined' for column 'image_category_id' at row 1

I have been having some problems with updating to the last few versions, and manually fixed some stuff maybe something went wrong there.

Edit:
I feel like it's trying to add an entry to the database, but there is no category set, so it returns an error instead of having the category set to null
 
Last edited:
Ahhh ok.. Since you seem to be having problems with updating to the last few versions, I would wait for Rod to have a look. It sounds like you haven't ran installer / updater properly, and the new category tables haven't been written to the database ??

Just overwriting the files with the new version files, isn't enough... You must run the install.php file.
If you have problems with that - or any other problems during the update, then these issues should be raised straight away so that it can be fixed without further damage being made.
 
A few versions ago the updater didn't work right, and didn't change the "chevereto_version_installed" in the database to the version being installed, so I ran the update and it wouldn't stick, I fixed that manually. Now it's running ok, the last few versions did install right away, and if i add one category to the list it works ok, but if i remove all the categories from the list and then try to upload something I get the SQL error

Edit:
I did a manual check to see if there were database entries missing but that wasn't the case.
 
I just tested a clean version and didn't get the error so there is something wrong on my end.

Thanks for the help AshleyUK.
 
Go to your chv_images table and make sure that image_category_id allows any value (by default is set to bigint + unchecked not null)
 
I have checked the entire database and compared it to a fresh install and I cannot find a difference.
Uploaded the entire zip file and just kept the settings file and still doesn't work.

I'll just use the categories because it does work if i have at least one category, and maybe in the future I'll do a fresh install.

Thanks for the help non the less.
 
Status
Not open for further replies.
Back
Top