Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » FOLDERS PROBLEM WITH IMAGE GALLERY

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 2475 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    Hello

    I have made a clean install of ss (2.4.5) with the latest (Github) modules :
    image_gallery
    dataobject_manager
    uploadify

    The install went ok but now I have a problem :
    Evrytime I create a gallery page it creates several folders in Files and images with the same name.
    Now if try to change the page type or try to delete some folders I get errors occuring because it doesn't find the right folder.

    I have seen post about that : http://www.silverstripe.org/dataobjectmanager-module-forum/show/13768?start=8

    but since I have the latest versions of everything I don't know if it is still valid

    If anyone had a clue or solution it would be great

    Thank

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    Hello

    I tried several things suggested in this post :
    http://www.silverstripe.org/dataobjectmanager-module-forum/show/14290?start=0

    I'm sure that folders assets and under are set to 777

    But I still get this error when trying to create a gallery page :

    ERROR [Warning]: rename(/var/www/vhosts/jourmalintime.net/httpdocs/newsite/assets/image-gallery/New-ImageGalleryPage-2/,/var/www/vhosts/jourmalintime.net/httpdocs/newsite/assets/image-gallery/New-ImageGalleryPage/) [<a href='function.rename'>function.rename</a>]: No such file or directory
    IN POST /newsite/admin/AddPageOptionsForm
    Line 421 in /var/www/vhosts/jourmalintime.net/httpdocs/newsite/sapphire/filesystem/File.php

    Source
    ======
    412:             // Only throw a fatal error if *both* before and after paths don't exist.
    413:             if(!file_exists($pathBeforeAbs)) throw new Exception("Cannot move $pathBefore to $pathAfter -
    $pathBefore doesn't exist");
    414:             
    415:             // Check that target directory (not the file itself) exists.
    416:             // Only check if we're dealing with a file, otherwise the folder will need to be created
    417:             if(!file_exists(dirname($pathAfterAbs))) throw new Exception("Cannot move $pathBefore to
    $pathAfter - Directory " . dirname($pathAfter) . " doesn't exist");
    418:          }
    419:          
    420:          // Rename file or folder
    * 421:          $success = rename($pathBeforeAbs, $pathAfterAbs);
    422:          if(!$success) throw new Exception("Cannot move $pathBeforeAbs to $pathAfterAbs");
    423:       }
    424:       
    425:       
    426:       // Update any database references
    427:       $this->updateLinks($pathBefore, $pathAfter);

    Trace
    =====
    <ul>rename(/var/www/vhosts/jourmalintime.net/httpdocs/newsite/assets/image-gallery/New-ImageGalleryPage-2/,/var/www/vhosts/jourmalintime.net/httpdocs/newsite/assets/image-gallery/New-ImageGalleryPage/)
    line 421 of File.php

    File->updateFilesystem()
    line 339 of Folder.php

    Folder->updateFilesystem()
    line 368 of File.php

    File->onAfterWrite()
    line 1056 of DataObject.php

    DataObject->write()
    line 91 of ImageGalleryPage.php

    ImageGalleryPage->checkFolder()
    line 63 of ImageGalleryPage.php

    ImageGalleryPage->onAfterWrite()
    line 1056 of DataObject.php

    DataObject->write()
    line 84 of ImageGalleryPage.php

    ImageGalleryPage->checkFolder()
    line 63 of ImageGalleryPage.php

    ImageGalleryPage->onAfterWrite()
    line 1056 of DataObject.php

    DataObject->write()
    line 560 of CMSMain.php

    CMSMain->addpage(Array,Form,SS_HTTPRequest)
    line 329 of Form.php

    Form->httpSubmission(SS_HTTPRequest)
    line 143 of RequestHandler.php

    RequestHandler->handleRequest(SS_HTTPRequest)
    line 161 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(/admin/AddPageOptionsForm)
    line 127 of main.php

    </ul>

    Thanks

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    Bum Bump ;)

    I'm quite desperate now :[

    I anyone has a clue about all this or was able to fix it because for me no miracle happened

    Thanks

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    Hello

    I'm stll stuck with my image gallery problem but still making progress:

    I found that if I manually set autorisation to 777 for the folder 'new-imagegallerypage' in assets/image-gallery/new-imagegallerypage/

    Then I'm able to save the image gallery page.

    So again ;) any clue ?

    Thanks

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    Hello

    I think i'm sure now about one thing :

    Even with assets/image-gallery set to recursive 777 permissions, when the folder named after the newly created page (image gallery page) is created it's permissions are set to 775 by default.

    Once I set it manually on 777 then everything goes well you can create albums (wich folders is created with 777 buy default) and save .

    Does anyone have an idea of how to have the newly created folder set to 777 by default.

    Thanks

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    im having a mare with the latest version of image_gallery and ss 2.4.5
    it all works fine locally, but as soon as i upload i have problems.

    clicking "create image gallery page" does nothing. (emails an error to me saying: Error: Uncaught Exception: Cannot move /var/www/vhosts/cafemusicstudios.com/httpdocs/assets/image-gallery/NewImageGalleryPage-8/ to /var/www/vhosts/cafemusicstudios.com/httpdocs/assets/image-gallery/NewImageGalleryPage-10/
    At line 422 in /var/www/vhosts/cafemusicstudios.com/httpdocs/sapphire/filesystem/File.php )
    if i refresh, the page appears, but if i try and upload an image it throws up a server error. and emails me a very similar error message to the one above.

    looks like permission issues with image_gallery creating directories?
    but my whole assets directory is 777.
    AND ive even tried manually creating the directories myself and giving them all 777 but it still fails.

    any help?!

  • warwick
    Avatar
    Community Member
    13 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    I am having exactly the same issues did anyone get a fix to this?

  • CHD
    Avatar
    Community Member
    218 Posts

    Re: FOLDERS PROBLEM WITH IMAGE GALLERY Link to this post

    yeah i got it working in the end, but i actually cant remember how!
    i THINK i may have used an older version of image-gallery...

    also, i deleted ALL mentions of image and image gallery in the database.
    then deleted the 3 modules.

    and re-installed them like this.

    dataobject & uploadify
    then dev/build

    then image_gallery
    dev/build again

    now it all seems to work fine.

    except for some reason uploadify is missing the 2 images in the CMS area "unlink and delete permanently" however they can easily be re-added yourself to the images folder. then referenced in the uploadify template file.

    2475 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.