Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » image gallery assets directories and rights

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1601 Views
  • George
    Avatar
    Community Member
    41 Posts

    image gallery assets directories and rights Link to this post

    Hi,

    because I haven't seen anymore my images I have done a new installation of image gallery (r331 with ss 2.3.4).
    Under assets/image-gallery the directory of the image gallery page is created. But when I add an album this directory is not created. Which rights and which owner is needed?
    Any other ideas what to check?

    Thanks

  • George
    Avatar
    Community Member
    41 Posts

    Re: image gallery assets directories and rights Link to this post

    Hi UncleCheese,

    I have checked now another complete new installation, the only modules dataobject, swfupload, image-gallery. The directory image-gallery was created but the album is not possible.
    I have now a trace:

    [Warning] mkdir(): Unable to access /<..>/httpdocs/assets/image-gallery/New-ImageGalleryPage-8/1/
    POST /admin/EditForm/field/Albums/AddForm?ctf[Albums][start]=0&ctf[Albums][per_page]=10&ctf[Albums][showall]=0&ctf[Albums][sort]=SortOrder&ctf[Albums][sort_dir]=DESC&ctf[Albums][search]=&ctf[Albums][filter]=

    Line 30 in /<..>/httpdocs/sapphire/filesystem/Folder.php
    Source

    21
    22       foreach($parts as $part) {
    23          $item = DataObject::get_one("Folder", "Name = '$part' AND ParentID = $parentID");
    24          if(!$item) {
    25             $item = new Folder();
    26             $item->ParentID = $parentID;
    27             $item->Name = $part;
    28             $item->Title = $part;
    29             $item->write();
    30             if(!file_exists($item->getFullPath())) mkdir($item->getFullPath(),Filesystem::$folder_create_mask);
    31          }
    32          $parentID = $item->ID;
    33       }
    34       return $item;
    35    }
    36    

    Trace

    * mkdir(/<..>/httpdocs/assets/image-gallery/New-ImageGalleryPage-8/1/,1533)
    Line 30 of Folder.php
    * Folder::findOrMake(image-gallery/New-ImageGalleryPage-8/1)
    Line 63 of ImageGalleryAlbum.php
    * ImageGalleryAlbum->onBeforeWrite()
    Line 783 of DataObject.php
    * DataObject->write()
    Line 245 of DataObjectManager.php
    * DataObjectManager->saveComplexTableField(Array,DataObjectManager_Popup,HTTPRequest)
    Line 241 of Form.php
    * Form->httpSubmission(HTTPRequest)
    Line 129 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 119 of Controller.php
    * Controller->handleRequest(HTTPRequest)
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct(/admin/EditForm/field/Albums/AddForm)
    Line 118 of main.php

  • UncleCheese
    Avatar
    4085 Posts

    Re: image gallery assets directories and rights Link to this post

    Weird. I've never seen it before. Looks like more of an issue for the Folder class than anything else. You should be able to pass a path to the findOrMake() function regardless of which folders exist.

    533 for the create mask seems awfully low to me. Can you try opening it up? Make sure Apache has read/write perms.

  • George
    Avatar
    Community Member
    41 Posts

    Re: image gallery assets directories and rights Link to this post

    I haven't payed attention. It seems that I have changed the safe mode. Now it works correctly with safe mode off.

    1601 Views
Page: 1
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.