Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

ImageGallery rotate image bug

Go to End



Community Member, 10 Posts

8 September 2010 at 12:11pm

I just worked through a random bug with the ImageGallery module. I'm not exactly sure what version it is, but it's a recent one. This may help someone else.

The bug appears when your in the admin backend, then clicking on an image in the "Photos" tab, then trying to rotate the image.
It looks like the bug only happens when you don't have your ss installation in the root dir, and therefore using .htaccess to reroute urls.

Firebug returns a 500 error like so:

ERROR [Warning]: copy(/Users/username/Clients/clientname/ss// failed to open stream: No such file or directory
Line 206 in /Users/username/Clients/client/htdocs/ss/image_gallery/code/ImageGalleryManager.php

I edited the working directory to hide client info etc.

To fix I edited the rotateimage() function in ImageGalleryManager.php & changed the line:

$url = $this->urlParams['OtherID'] == 'cw' ? $image->RotateClockwise()->URL : $image->RotateCounterClockwise()->URL;

$url = $this->urlParams['OtherID'] == 'cw' ? $image->RotateClockwise()->Filename : $image->RotateCounterClockwise()->Filename;

This way the code only worries about the dir path from the root of the install, rather than the url etc.