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.

All other Modules /

Discuss all other Modules here.

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

Gallery module and static publisher


Reply


5 Posts   2484 Views

Avatar
Anatol

126 Posts

12 March 2009 at 3:32pm

Edited: 12/03/2009 3:35pm

Hi,

it seems that the Gallery module (v 0.2.2) and Silverstripe 2.3.0 causes some problems in combination with the [url=http://doc.silverstripe.com/doku.php?id=staticpublisher]static publisher[/url] extension.

Whenever I want to "save and publish" the gallery I get an error message. Initially that was a Javascript Parse Error ("missing ; before statement"). Now it just says "Error saving content" (Error 500). If I remove the gallery page or uninstall the module or if I don't use the static publisher extension (uncommenting it in _config.php is enough) everything works the way it should.

Unfortunately I don't get the original error message any more to give further details (the Javascript Parse Error) - and I don't know what should have changed between this and the current error. I remember, though, that it said the error is in http://www.mydomain.com/silverstripe_installation_path/admin/editForm

What happened was that the page was saved but the site tree in the CMS on the left was not updated. I had to refresh the page to get an up-to-date site tree.

Do I have to enable the static publisher for individual modules or can anyone think of other reasons why this happens? I enabled the static publisher in /mysite/code/Page.php and /mysite/_config.php and I assumed that it would then work for any page including modules.

Cheers!
Anatol

Avatar
Anatol

126 Posts

12 March 2009 at 4:53pm

Hi,

In addition to the post above the problem may be in the caching code for the gallery subpages. I get the following error in my error logfile:

PHP Fatal error: Call to a member function Pages() on a non-object in /path/to/silverstripe/gallery/code/GalleryPage.php on line 356

which is

function subPagesToCache() {
      $urls = parent::subPagesToCache();
      $urls[] = $this->Link() . 'rss';

      $pages = $this->GalleryItems($this->MediaPerPage)->Pages();
      foreach($pages as $page) {
         $urls[] = $page->Link;
      }
      return $urls;
}

The error does not tell me much. Does anyone have an idea?

Cheers!
Anatol

Avatar
UncleCheese

Forum Moderator, 4094 Posts

12 March 2009 at 4:58pm

That module is old, and last I checked it is not supported anymore. Use the new one here:

http://www.silverstripe.org/all-other-modules/show/250910

Docs

http://doc.silverstripe.org/doku.php?id=modules:image_gallery

Avatar
Anatol

126 Posts

13 March 2009 at 9:57am

Hi UncleCheese,

thank you for this information. I installed swfupload, dataobject_manager and the image_gallery: Wow, these are FANTASTIC extensions and modules. Very very well built and I can see a lot of ways to use the dataobject manager for custom pages.

You should really get all of this up on the [url=http://www.silverstripe.org/modules/]Silverstripe modules[/url] page so people become aware of it.

A million thanks for your contribution!
Anatol

Avatar
UncleCheese

Forum Moderator, 4094 Posts

13 March 2009 at 10:07am

Yeah, thanks. I've gotten a lot of great feedback. I submitted them to SS a couple days ago. Haven't heard anything.

Hello?? SS Developers? Are you listening?

Anyway.. keep updating your SVN. The feature enhancements and bug fixes are coming through fast.