Page 1 of 1

[Solved]News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 1:50 pm
by LuTHieR1729
Hi,

I'm working on a CMS Made Simple Site (latest version, 1.9.1) and pretty much everything works OK, except that when I try to upload a news article with too many file fields (up to 22 or 23) it leaves the last ones blank and gives no error message (but uploads the article properly and I can see it on the site).

It doesn't even work if I edit the article after it's submitted. I edit it, fill the now-blank file fields, click "Submit"... and when I go back to edit the article, they fields are empty once again :(

Does anyone know if there's something like of maximum number of files attached to a news article or if I might be doing anything else wrong?

Thank you very much in advance :)

Re: News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 2:51 pm
by RonnyK
what type of field is the last one, that gets emptied?

Ronny

Re: News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 3:47 pm
by LuTHieR1729
They are all file fields, I use them for .jpg images. Thanks for the interest :)

Re: News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 4:05 pm
by RonnyK
and it doesnt have to do with some strange naming of the last image? Did you try with same-named working images?

Ronny

Re: News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 4:29 pm
by LuTHieR1729
All the images have similar names (name_a_m.jpg, name_b_m.jpg, name_c_m.jpg, ...) and I have just tried uploading one of the images that work ok in the previous fields and it still doesn't save it :(

And what's more, there's one article that has saved the value for that field and displays it properly :S (versus many other articles that don't)

Re: News module deleting some file fields values after submitting an article

Posted: Thu Nov 25, 2010 6:31 pm
by Dr.CSS
Most likely PHP is having a problem, may I ask why you have so many fields, you may want to use something else to get all those images in...

Re: News module deleting some file fields values after submitting an article

Posted: Fri Nov 26, 2010 9:55 am
by LuTHieR1729
Well, every news item has up to 12 images and their respective thumbnails, and since the website is for a customer that has little computer knowledge I wanted to make it so that all the text and the pictures could be uploaded from the same page, to avoid confusion and possible mistakes.

If it is a kind of php error, do you know is there any log or anywhere I could find out what the error is so that I can, at least, try to find another solution?

Thanks!

Re: News module deleting some file fields values after submitting an article

Posted: Sat Nov 27, 2010 3:35 am
by Dr.CSS
Most servers have an error log in the root of the site, may have to ask your host how to access it...

Re: News module deleting some file fields values after submitting an article

Posted: Sun Nov 28, 2010 9:51 am
by LuTHieR1729
I checked and there was only an access.log file which has no mention to any errors :( I'm going to check the file action.addarticle.php to see if I find what can be causing the problem, if I find something I'll post it here... and if anyone has any other idea, I'd be more than happy to listen to it :)

Thanks again!

Re: News module deleting some file fields values after submitting an article

Posted: Sun Nov 28, 2010 5:34 pm
by LuTHieR1729
I FIXED IT!!!!!!!!!!!!!!!! ;D

After trying pretty much everything I found that there's a PHP parameter called max_file_uploads which default value is 20, so you can upload only 20 files at a time by default.

I created a php.ini file with max_file_uploads = 35, put it in web/admin and it worked!!

Thank you for all your help, I hope this can help someone else in the future.

Cheers,

Gonzalo.

Re: [Solved]News module deleting some file fields values after submitting an article

Posted: Sun Nov 28, 2010 5:36 pm
by calguy1000
That will buy you a little bit of time.

but if your user is uploading 5MB files, x 25 files = 100MB you can quickly run into other problems with
POST time out
POST max size
PHP memory limit

Re: [Solved]News module deleting some file fields values after submitting an article

Posted: Sun Nov 28, 2010 5:40 pm
by LuTHieR1729
Thanks calguy, I hope I will not have problems with that (since the user is only going to upload small images, a lot of them, but only small images :)). I will however warn him about the image sizes in the user manual and remind him just in case. Thank you!