10375 Posts in 2190 Topics by 1707 members
| Go to End | Next > | |
| Author | Topic: | 66873 Views |
-
Re: Image Gallery Extension: Testers Needed

1 October 2010 at 5:49am
Hi UncleCheese I#m haviong the following Problem with Image Gallery. First of all, I fetched the newest Trunk of today but also tried it with Trunks of one and two weeks ago.
Error appears on SS 2.4.0, 2.4.1, 2.4.2
When I Install the image Gallery on a fresh installation, I can ad a first ImageGalleryPage without Problems. But the second one I want to add responses with the Following Error in the Ajax Request (read through Firebug Console):
ERROR [Warning]: rename(/var/customers/df1media/htdocs/assets/image-gallery/NeuImageGalleryPage-10/,/var/customers/df1media/htdocs/assets/image-gallery/NeuImageGalleryPage-11/): No such file or directory
IN POST /admin/AddPageOptionsForm
Line 408 in /var/customers/df1media/htdocs/sapphire/filesystem/File.phpSource
======
399: // Only throw a fatal error if *both* before and after paths don't exist.
400: if(!file_exists($pathBeforeAbs)) throw new Exception("Cannot move $pathBefore to $pathAfter -
$pathBefore doesn't exist");
401:
402: // Check that target directory (not the file itself) exists.
403: // Only check if we're dealing with a file, otherwise the folder will need to be created
404: if(!file_exists(dirname($pathAfterAbs))) throw new Exception("Cannot move $pathBefore to
$pathAfter - Directory " . dirname($pathAfter) . " doesn't exist");
405: }
406:
407: // Rename file or folder
* 408: $success = rename($pathBeforeAbs, $pathAfterAbs);
409: if(!$success) throw new Exception("Cannot move $pathBeforeAbs to $pathAfterAbs");
410: }
411:
412:
413: // Update any database references
414: $this->updateLinks($pathBefore, $pathAfter);Trace
=====
<ul>rename(/var/customers/df1media/htdocs/assets/image-gallery/NeuImageGalleryPage-10/,/var/customers/df1media/htdocs/assets/image-gallery/NeuImageGalleryPage-11/)
line 408 of File.phpFile->updateFilesystem()
line 339 of Folder.phpFolder->updateFilesystem()
line 355 of File.phpFile->onBeforeWrite()
line 936 of DataObject.phpDataObject->write()
line 91 of ImageGalleryPage.phpImageGalleryPage->checkFolder()
line 63 of ImageGalleryPage.phpImageGalleryPage->onAfterWrite()
line 1056 of DataObject.phpDataObject->write()
line 84 of ImageGalleryPage.phpImageGalleryPage->checkFolder()
line 63 of ImageGalleryPage.phpImageGalleryPage->onAfterWrite()
line 1056 of DataObject.phpDataObject->write()
line 559 of CMSMain.phpCMSMain->addpage(Array,Form,SS_HTTPRequest)
line 300 of Form.phpForm->httpSubmission(SS_HTTPRequest)
line 137 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 155 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 281 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 124 of Director.phpDirector::direct(/admin/AddPageOptionsForm)
line 127 of main.php</ul>
-
Re: Image Gallery Extension: Testers Needed

2 October 2010 at 7:40am
Hi there, forgot to mention, the described error is returned by the Following Script http://test.df1media.de/admin/AddPageOptionsForm?Locale=en_US&PageType=ImageGalleryPage&ParentID=1&SecurityID=967571966&Suffix=1&action_addpage=1&ajax=1
-
Re: Image Gallery Extension: Testers Needed

2 October 2010 at 9:11am
Hi there, I fixed the ImageGalary by myself.
the method checkFolder() in ImageGalleryPage.php starting at line 73 should be changed to the following:
function checkFolder() {
if( ! $this->RootFolderID ) {
$galleries = Folder::findOrMake('image-gallery');
$galleries->Title = 'Image Gallery';
$galleries->write();
$folder = Folder::findOrMake('image-gallery/' . $this->URLSegment);
$folder->Title = $this->URLSegment;
$folder->setName($this->URLSegment);
$folder->write();
$this->RootFolderID = $folder->ID;
$this->write();
$this->requireDefaultAlbum();
FormResponse::add( "\$( 'Form_EditForm' ).getPageFromServer( $this->ID );" );
}
else {
$this->RootFolder()->Title = $this->URLSegment;
$this->RootFolder()->setName($this->URLSegment);
$this->RootFolder()->write();
}
}Hope this helps anyone having the same Problems.
-
Re: Image Gallery Extension: Testers Needed

12 October 2010 at 6:58pm
Ho there,
another error was raised on my ImageGallery Installation.
It seems, that old Galleries, added under 2.3.x, are incompatible with 2.4.x.
Most of my old Galleries do not work. Also I'm unable to add Pictures from my old Galleries to a new one.
Here is the Error Message I get after adding a new Album and trying to add Pictures from an existing Folder of a Gallery prior SS 2.4.x.
It adds the Pictures insite Uploadity and when pressing "continue" the following comes up. Afterwards there are just empty Pictures shown in DataObjectManager unter Photos.[Notice] Trying to get property of non-object
POST /admin/EditForm/field/GalleryItems/UploadifyForm?ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_198&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100Line 140 in /var/customers/hsvhandball/htdocs/image_gallery/code/ImageGalleryManager.php
Source
131 {
132 $childData = parent::getChildDataObj();
133 $childData->ImageGalleryPageID = $this->controllerID;
134 return $childData;
135 }
136
137 public function getPreviewFieldFor($fileObject, $size = 150)
138 {
139 if($fileObject instanceof Image) {
140 $URL = $fileObject->SetHeight($size)->URL;
141 return new LiteralField("icon",
142 "<div class='current-image'>
143 <div id='preview-image'>
144 <img src='$URL' alt='' class='preview' />
145 <div class='ajax-loader'><img src='dataobject_manager/images/ajax-loader.gif' />". _t('ImageGalleryManager.ROTATING','Rotating')."...</div>
146 </div>
TraceImageGalleryManager->getPreviewFieldFor(ImageGalleryImage)
Line 512 of FileDataObjectManager.php
FileDataObjectManager->EditUploadedForm()
Line 436 of FileDataObjectManager.php
FileDataObjectManager->saveUploadifyForm(Array,ImageGalleryManager_Popup,SS_HTTPRequest)
Line 300 of Form.php
Form->httpSubmission(SS_HTTPRequest)
Line 137 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
Director::direct(/admin/EditForm/field/GalleryItems/UploadifyForm)
Line 127 of main.phpIs Image Gallery still under Development, or is it stuck?
-
Re: Image Gallery Extension: Testers Needed

15 October 2010 at 1:32am
Is there a way to work out which base template is doing the rendering at any point?
More specifically, when on a PAGE page I want to do something with the breadcrumb trail and when on an ALBUM page I want to do something else. I've been outputting all the page variables I can find and they are all identical, regardless of the underlying template.
Is there a list of page variables specific to this module published anywhere?
jf/
-
Re: Image Gallery Extension: Testers Needed

15 October 2010 at 10:26pm
^^bump^^
Uncle Cheese, are you there?
jf/
-
Re: Image Gallery Extension: Testers Needed

16 October 2010 at 3:12am
Sorry, it's just difficult for me to troubleshoot these issues without being able to see them. Have you been able to replicate the issue on the demo site? http://dataobjectmanager.carlinowebdesign.com (admin/password)
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com -
Re: Image Gallery Extension: Testers Needed

16 October 2010 at 3:34am
Hi Uncle Cheese
I don't really have an issue, nothing's broken. I'm just trying to soup-up my breadcrumb trail. The problem is this:
When I create a gallery and place say three albums inside it I want my breadcrumb to do this:
something > something > galleryName (when on the gallery, ie. the cover image thumbnails)
something > something > galleryName > albumName (when on the album thumbnails)By default, the module always does the former and never the latter. I believe that's because regardless of gallery or album, it's always the same underlying record in sitetree_live that is being called.
Now, galleryName is always $Title and albumName is $AlbumTitle, so I know how to retrieve the values I need. My problem is that I don't know how to tell the difference when I'm actually on a gallery page or an album page. ALL the variables, eg. URLSegment, are identical on both 'pages'.
So the question is, which variable can I interrogate which tells me which type of page I am on?
jf/
| 66873 Views | ||
| Go to Top | Next > |


