Post by etapombas » Wed Jul 23, 2008 1:00 am

in controller admin image, line 80
i comment the "if" because i cant update new images
please check it

sorry my english

      //if ($upload->has('image')) {

        $sql = "update image set filename = '?' where image_id = '?'";

        $database->query($database->parse($sql, $upload->getName('image'), $request->get('image_id')));

      //}

Newbie

Posts

Joined
Thu May 29, 2008 3:23 am

Post by boraz » Sat Aug 23, 2008 12:05 am

Yea, could anyone tell me why can't I update image with new file?

Newbie

Posts

Joined
Tue Jul 29, 2008 5:37 am

Post by JNeuhoff » Sat Aug 23, 2008 12:21 am

etapombas wrote: in controller admin image, line 80
i comment the "if" because i cant update new images
please check it

sorry my english

      //if ($upload->has('image')) {

        $sql = ";

        $database->query($database->parse($sql, $upload->getName('image'), $request->get('image_id')));

      //}
I think what it means is this:
If for some reason the user hasn't clicked on the UPDATE button, that is, no image has been specified in the POST query string, it won't do the SQL command:

Code: Select all

update image set filename = '?' where image_id = '?'
which makes perfect sense to me. Unless there is a bug elsewhere.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by boraz » Sat Aug 23, 2008 3:42 am

I think what it means is this:
If for some reason the user hasn't clicked on the UPDATE button, that is, no image has been specified in the POST query string, it won't do the SQL command:

Code: Select all

update image set filename = '?' where image_id = '?'
which makes perfect sense to me. Unless there is a bug elsewhere.
I've tried clicking both update/save buttons and there's no effect. However it's working when I comment that if statement, seems like a bug to me  :-\

Newbie

Posts

Joined
Tue Jul 29, 2008 5:37 am

Post by Qphoria » Thu Nov 13, 2008 1:17 pm

Are you using the latest version for this?

When I goto Admin->Catalog->Images and edit image 1 and upload a new file called "image_1.jpg" and click save, it shows my new image. What are you seeing ?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Tue Dec 02, 2008 7:29 pm

Qphoria wrote: When I goto Admin->Catalog->Images and edit image 1 and upload a new file called "image_1.jpg" and click save, it shows my new image. What are you seeing ?
It happens when there was no image selected/saved in the first place.

To replicate -
Add a new image record but do not select a file so there is no image pic for the image record
Now go back to that record and not able to select a filename for that record
Comment out the "if" statement referred to above and it now works

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Wed Dec 03, 2008 4:10 am

fixed in r244

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest