Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images show up with red X HELP PLEASE!


fozzynetworks

Recommended Posts

Posted

Hi, I've changed Image required in the admin panel to false and have calculate iamge size set to true. Yet my images still show up with red Xs for the products. I want to add some products with images and some without. Please help me. Thank you.

Posted

Sounds like your pictures weren't uploaded in Binary But ACSSI instead.

 

Delete everything in your images directory, and FTP up a (hope you saved copies) fresh copy of your images in Binary format and that should fix it up for you.

 

Ryan

Posted

Oh, in that case =)..

 

All you have to do is edit your config options.

 

In your admin panel configuration under Configuration go to images, on hte bottom you'll see Image Required = True.. Change that to false and your set.

 

Ryan

Posted

Check your products table and make sure that the products_image field on the products without an image does not read Array.

 

If it does, these need to be cleaned out.

Posted

Blah....

 

Missed this one by a mile =) Sorry guys... wasn't paying attention, I'm surfing while working...

 

Sorry for the miss information heheh.

Posted

Your's sounded really, really good though ... :D

 

I just know that pesky bug is lurking out there ... 8)

Posted

I actually had the problem myslef before with the red x there.. I saw that and put blinders on to my resolution hehe..

 

I've been playing with OCS for about 11 months now, putting it, taking off, reinstalling it and generally going nuts iwth it =)..

 

I am planning to start skinning for it soon, and hope to share that with the community as soon as I have something that doesn't look like crap =)

 

/cheers.

  • 4 weeks later...
Posted

I'm having same problem and the setting are set for "false" for required and "true" for calculate size.

 

The product does show 'array' when I edit the product. How do I clean it out?

  • 3 weeks later...
Posted
After searching the forum long enough, I found the info I needed.  

 

YEAH for the forums!

 

Thanks.

 

would you mind sharing what that solution was? I am still having the problem and have searched all morning.

USA123.com

Content Management and Training to boot.

Posted

What is happening is on adding a new product when no image is used it is inserting the word Array into the products_image field.

 

Technically this is an image filename to the code, it doesn't know any better ... :shock:

 

You can clean that out with:

 

UPDATE products set products_image='' where products_image='Array'

 

There is a contribution by Ian Wilson for a temp fix to this error.

Posted

It appears that this bug was fixed in the fully loaded snapshops, does nobody know how to fix it in the standard version too?

  • 1 month later...
Posted

Go into the admin/includes/functions/html_output.php file

 

and, change that tep_draw_hidden_field function to:

 

////

// Output a form hidden field

function tep_draw_hidden_field($name, $value = '') {

$field = '<input type="hidden" name="' . $name . '" value="';

if ($value != '') {

$field .= trim($value);

} else if ($GLOBALS[$name] && (!(is_array($GLOBALS[$name]))) ) {

$field .= trim($GLOBALS[$name]);

} else {

$field .= "";

}

$field .= '">';

 

return $field;

}

// END edit

 

 

the problem lies in the fact that the old function ALWAYS expects a variable to have a string value, but doesn't take into consideration the fact that POSTED_FILES are always arrays...

 

Thus the value of 'Array' when the 'Array' object is trimmed()

 

the logic in catalog.php sets the image name accordingly, so you don't have to worry about pulling it out of the uploaded image array again.

 

Cheers

 

Matt

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...