Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » Gallery module and static publisher

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 2383 Views
  • Anatol
    Avatar
    126 Posts

    Gallery module and static publisher Link to this post

    Hi,

    it seems that the Gallery module (v 0.2.2) and Silverstripe 2.3.0 causes some problems in combination with the static publisher 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

  • Anatol
    Avatar
    126 Posts

    Re: Gallery module and static publisher Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Gallery module and static publisher Link to this post

    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

  • Anatol
    Avatar
    126 Posts

    Re: Gallery module and static publisher Link to this post

    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 Silverstripe modules page so people become aware of it.

    A million thanks for your contribution!
    Anatol

  • UncleCheese
    Avatar
    4085 Posts

    Re: Gallery module and static publisher Link to this post

    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.

    2383 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.