Jump to content

{Solved} Images wil not upload on existing store


Recommended Posts

I am having a problem today using 1.4.4.0 on an existing store.

I am manually adding a product. When I get to the image tab, I choose my image to upload, click save & stay, and it takes me to this:

Back Office separator_breadcrum.png Catalog

with a blank page. Tried several times & it just will not let me add an image.

I have never had this problem in the past. Just started for me today.

My file permission have not been changed since I last uploaded images, and the file extension is .jpg.

 

Thanks in advance,

Kathleen

 

post-189832-0-50284500-1318274900_thumb.jpg

Link to comment
Share on other sites

My image size is 29kb. PHP Time Limit is disabled.

I've never had issues like this in the past and have added quite a few products manually without issue before.

This just started several days ago.

It only happens when I try to upload an image thru the backend.

Link to comment
Share on other sites

Here's the error I received:

Fatal error: Call to undefined method GroupReduction::getGroupByCategoryId() in /home/bewitching/bewitchingbookshoppe.com/classes/Product.php on line 3401

 

Unsure what it means in reference to images.

I can update every other tab in a product except images.

 

Thanks for walking me thru this!

Kathleen

Link to comment
Share on other sites

This is what lines 3396-3411 show:

 

/**
 * Set Group reduction if needed
 */
public function setGroupReduction()
{
 $row = GroupReduction::getGroupByCategoryId((int)$this->id_category_default);
 if (!$row) // Remove
 {
  if (!GroupReduction::deleteProductReduction((int)$this->id))
   return false;
 }
 else if (!GroupReduction::setProductReduction((int)$this->id, $row['id_group'], (int)$this->id_category_default, (float)$row['reduction']))
   return false;
 return true;
}

 

Hope this helps you figure out what the issue is.

Thanks so much !

Kathleen

Link to comment
Share on other sites

Strange. You said you are using 1.4.4.0 but the snippet you posted is not from the Product.php that comes with the 1.4.4.0 install. Both the method call in Product.php that is causing the fatal error and the method (of GroupReduction class) that is reported to be undefined in the error message were added post 1.4.4.0.

 

Did you make any manual changes to the files? What is the version number at the very top of the Product.php file (@version Release: $Revision: ???? $)?

 

If you replaced Product.php with a later version, you may try to do the same with GroupReduction.php but I cannot be sure of consistency of a haphazard replacement like this; another error may popup somewhere else. Best to figure out why it is different.

Link to comment
Share on other sites

@author PrestaShop SA <[email protected]>

* @copyright 2007-2011 PrestaShop SA

* @version Release: $Revision$

* @license http://opensource.or...ses/osl-3.0.php Open Software License (OSL 3.0)

* International Registered Trademark & Property of PrestaShop SA

 

I did drop in an SVN version of classes/products.php a few months back, trying to fix a problem, I bet I forgot to change it back !

 

Would you advise me to replace what I have with the original 1.4.4.0 classes/product.php ?

Link to comment
Share on other sites

I am getting this same issue. Fresh install of PS, just started working on it.

I get the same blank screen when I try to upload images for a product. I just tried replacing the "product.php" file with no luck.

Can someone please help?

Thanks

Link to comment
Share on other sites

Hey Nelram, welcome to Prestashop.

You'll want to tell us what version you're using, as different versions sometime have areas that function differently, or have different scripts running those areas.

Are you using 1.4.4.1 or the latest 1.4.5.1 release?

If you go to post #4 in this thread, Phrasespot has a link that will show you how to turn on error reporting.

If you can post the errors you're getting, it will give us something to go on ;)

Good luck !

Kathleen

Link to comment
Share on other sites

Thanks for the welcome! I am really liking PS so far.

I am using 1.4.4.1

I turned on the error reporting and this is what I get:

Fatal error: Call to undefined method GroupReduction::getGroupByCategoryId() in /home/bayshor3/public_html/classes/Product.php on line 3404

Link to comment
Share on other sites

Well, I fixed it but I have no idea how... lol

I tried replacing "product.php" from 1.4.4.1 with "product.php" from 1.4.5.1 and that did not work so I put the "product.php" from 1.4.4.1 back in and now it will let me place the images.

I have no idea why, I didn't change anything in the file.

Thank you so much for your help Kathleen!

Link to comment
Share on other sites

Hey Nelram,

Well, I'm glad you got it going again :) Isn't it great when things just fix themselves ? You have no idea what you did, but it's fixed ! LOL

Here's a hint that you may not know, and really should be discussed more often in these forums LOL

Anytime you change something related to code, and sometimes even just a translation, you need to go under Preferences, then Performance, and set force compile to yes, and cache to no. Do the changes you need to make. Then refresh the admin page, go back to preferences/perfomance and set force complie back to no, and cache back to yes.

Prestashop used the smarty compile system. If you don't force compile, the changes don't show on the front end, and sometimes even on the back end.

This was a very frustrating issue for me in the past, because I'd change things & they'd never show.

So keep this in mind for future changes you make & things will be less stressful for you !

 

Have a great day !

Kathleen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...