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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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 :)
Last edited by LuTHieR1729 on Sun Nov 28, 2010 5:34 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post by RonnyK »

what type of field is the last one, that gets emptied?

Ronny
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post by LuTHieR1729 »

They are all file fields, I use them for .jpg images. Thanks for the interest :)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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!
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
LuTHieR1729
Forum Members
Forum Members
Posts: 10
Joined: Wed Sep 02, 2009 11:25 am

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

Post 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!
Post Reply

Return to “CMSMS Core”