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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Image Gallery Extension: Testers Needed


Go to End


417 Posts   117790 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

12 October 2009 at 11:03am

Weird. I don't know why your SortOrder field would be null. I would just sort your albums once and that will update all of them with proper values.

Avatar
WalterW

Community Member, 18 Posts

12 October 2009 at 11:57pm

The database field "SortOrder" is set for all pages (values from "0" to "4")!

It seems, that the property {$this->CurrentAlbum()->SortOrder} (in the ImageGalleryPage.php) is not set under some (rare) circumstances.

Maybe we could do a reasonable preset for this property?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

13 October 2009 at 1:14am

It should be setting the sort automatically on create. If you look at the last function in SortabledDataObject, you see..

	public function onBeforeWrite()
	{
		if(!$this->owner->ID) {
			if($peers = DataObject::get($this->owner->class))
				$this->owner->SortOrder = $peers->Count()+1;
		}
	}	

Maybe something is wrong with that logic, but I've never seen this happen before.

Maybe instead of !$this->owner->ID it should be if(!$this->owner->SortOrder) ?

Avatar
WalterW

Community Member, 18 Posts

13 October 2009 at 1:47am

To help you: This problem happens, when customers look to our images, they cannot insert or edit anything in the CMS!
So the image related tables are quite static (maybe they have not been changed for some weeks)!

Avatar
Pranil

Community Member, 17 Posts

13 October 2009 at 5:01pm

Edited: 13/10/2009 5:01pm

Hey i get the same problem every now and then. Any ideas on how to fix it? Do we try the fix that UncleCheese suggested? Or is it something else?

Avatar
denisrosset

Community Member, 4 Posts

25 January 2010 at 6:28am

Edited: 25/01/2010 6:43am

Hi all,

I tried to change the ImageGallery css in my custom theme, and was unable to do so using the stock ImageGallery install. If you want to do the same, you need to change a line in ImageGalleryPage.php; see attached patch.

Cheers,

Denis

Avatar
UncleCheese

Forum Moderator, 4102 Posts

25 January 2010 at 7:17am

Thanks! I've been meaning to update that for a while. Just checked it in.

Avatar
churika

Community Member, 29 Posts

4 March 2010 at 5:40pm

Edited: 04/03/2010 6:37pm

I'm unsure how to address the problem I have, and it's probably my own fault for not understanding how this all fully works but...

I installed the dataobject_manager, swfupload and image_gallery correctly.

But When I come to this page...(See buttonproblem.jpg attachment) the button is all messed up, but none the less the button works, just not sure why it's like that.

Anyways my main problem is that I create an image gallery page using the image gallery template and then save & publish it, added the images fine, edit the albulm fine.

Then I go to look at it http://127.0.0.1/gallery/ and nothing but a blank template is there...why is this?

I created my own custom theme I don't know if this has anything to do with the problem.

I tried inserting <% include GalleryPageContent %> but that gave me huge missing file errors or something.

This is the error message...

[Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty
GET /gallery/album/Default-Album

Line 280 in D:\Web\xampp\htdocs\sapphire\core\SSViewer.php

Attached Files
Go to Top