1

I have a WordPress website that basically has both normal content / blog pages and WooCommerce pages. On the WooCommerce pages, I will at random receive the following error at top of the page:

Trying to upload files larger than 128M is not allowed!

The strange thing is nothing was being uploaded at the time of this error, nor is there any option to upload anything from the front end. This error happens at random on product pages, category pages and cart pages.

Does anyone have any idea what could be causing this problem?

Thanks in advance Willem

Willem
  • 417
  • 1
  • 6
  • 16
  • Please do either post here or on wordpress.stackexchange.com ([as you already did](https://wordpress.stackexchange.com/questions/207124/trying-to-upload-files-larger-than-128m-is-not-allowed-woocommerce-error)), not on both. Where do you want me to answer? – flomei Nov 02 '15 at 08:38
  • Sorry, I'll delete the post from wordpress.stackexchange.com, I wasn't getting any response on that post. Please answer here. Thanks :) – Willem Nov 02 '15 at 08:42
  • Hi @flomei, did you have an answer to the question or were you just letting me know that I needed sort out the multiple questions? Any help would be greatly appreciated. – Willem Nov 16 '15 at 12:30
  • Well, I did some Google searches back then and it seems like your error might be caused by a PHP misconfiguration. Can you make sure PHP is configured well? – flomei Nov 17 '15 at 13:18
  • What kind of an error would I be looking for? I'm a front-end developer so I'm not experienced with this kind of work. – Willem Nov 18 '15 at 09:18
  • Same problem for me. :-/ I think "upload_max_filesize" and things like that could be the problem. [(Topic on changing that value...)(https://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size) – flomei Nov 18 '15 at 09:22
  • I have already increased the maximum upload file size, but it doesn't make a difference, but this makes sense to me since nothing is actually being uploaded. – Willem Nov 19 '15 at 06:51
  • Sometimes it displays multiple lines of the same error, I've seen as many as 40 lines of this error on one page, but again, I'm not actually uploading anything... – Willem Nov 19 '15 at 06:56

1 Answers1

0

The best solution I've been able to find so far is, since this is a 'false error', hide the error using the following CSS:

/*-- WooCommerce Errors --*/

#bodywrap .woocommerce-error {
display: none;
}

.woocommerce .woocommerce-checkout .woocommerce-error {
display: block !important;
}

This seems to hide the 'false error' while still displaying things like shopping cart errors.

If anyone has any better solutions please let me know.

Thanks

Willem
  • 417
  • 1
  • 6
  • 16
  • This works for the shop pages but I also get the error in the cart as well for me. So they still show up there. I agree though for users if they fill out wrong info, they will still need the other errors that come up/. – Tom Feb 19 '16 at 20:44