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

rotate in image gallery


Reply


5 Posts   600 Views

Avatar
servalman

Community Member, 211 Posts

9 June 2011 at 7:22pm

Hi

I tried to search the forum but couldn't find a working solution to this problem :

The rotate function int the popup seems not to be working this is the error I get.

Uncaught Exception: Object->__call(): the method 'imagegallerymanager_controller' does not exist on 'ImageDataObjectManager_ItemRequest

If anyone as a solution please help

Thank you

Avatar
UncleCheese

Forum Moderator, 4093 Posts

10 June 2011 at 4:10am

There was a bug in ImageGalleryManager::RotateLink(). Just pushed in a fix.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
servalman

Community Member, 211 Posts

10 June 2011 at 10:42pm

Thanks Oncle fromage

Dois juste remplacer ImageGalleryManager.php dans image_gallery/code ? abd run dev/build

Thanks

Avatar
UncleCheese

Forum Moderator, 4093 Posts

11 June 2011 at 3:27am

Si tu utilises le code sur Github, il ne faudrait que mettre à jour le module avec "git pull"

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
servalman

Community Member, 211 Posts

11 June 2011 at 3:33am

Re bonjour

J'ai maintenant une nouvelle erreur qui semble liée à un chemin inexistant

ERROR [Warning]: copy(/var/www/vhosts/LAURENCEKIBERLAIN.NET/httpdocs/sitenew//sitenew/assets/image-gallery/paris/paris/_resampled/rotatecounterclockwise-pariggi2.jpg) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory
IN GET /sitenew/ImageGalleryManager_Controller/rotateimage/397/ccw?flush=1
Line 226 in /var/www/vhosts/LAURENCEKIBERLAIN.NET/httpdocs/sitenew/image_gallery/code/ImageGalleryManager.php

Source
======
217:
218:
219: }
220:
221: public function rotateimage()
222: {
223: if($image = DataObject::get_by_id("ImageGalleryImage", $this->urlParams['ID'])) {
224: $url = $this->urlParams['OtherID'] == 'cw' ? $image->RotateClockwise()->URL :
$image->RotateCounterClockwise()->URL;
225: $original_file = $image->Filename;
* 226: if(copy(Director::baseFolder().'/'.$url, Director::baseFolder().'/'.$original_file)) {
227: $image->flushCache();
228: $image->clearResampledImages();
229: }
230: echo $image->SetHeight(200)->URL . "?t=".time();
231: }
232: }

Trace
=====
<ul>copy(/var/www/vhosts/LAURENCEKIBERLAIN.NET/httpdocs/sitenew//sitenew/assets/image-gallery/paris/paris/_resampled/rotatecounterclockwise-pariggi2.jpg,/var/www/vhosts/LAURENCEKIBERLAIN.NET/httpdocs/sitenew/assets/image-gallery/paris/paris/pariggi2.jpg)
line 226 of ImageGalleryManager.php

ImageGalleryManager_Controller->rotateimage(SS_HTTPRequest)
line 193 of Controller.php

Controller->handleAction(SS_HTTPRequest)
line 143 of RequestHandler.php

RequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.php

Controller->handleRequest(SS_HTTPRequest)
line 282 of Director.php

Director::handleRequest(SS_HTTPRequest,Session)
line 125 of Director.php

Director::direct(/ImageGalleryManager_Controller/rotateimage/397/ccw)
line 127 of main.php

</ul>