Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Image Gallery Clean Install

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 1930 Views
  • africansafari
    Avatar
    Community Member
    30 Posts

    Re: Image Gallery Clean Install Link to this post

    Uncle Cheese - I have done this. All modules are in silverstripe root - in this case, a subfolder as I am testing for new website.

    I have also uninstalled "image_gallery", "dataobject_manager" and "swfupload". I have also deleted the following tables from php record

    ImageGalleryAlbum
    ImageGalleryItem
    ImageGalleryPage
    ImageGalleryPage_Live
    ImageGalleryPage_versions

    I have then reinstalled, however still getting same error.

    Any other suggestions???

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Clean Install Link to this post

    The assets aren't being read for one reason or another. Check the source code for the js and css files and test navigating to them directly in your browser. It could be a permissions issue or something else. Hard to say. Something isn't set up right.

  • Sadu
    Avatar
    Community Member
    5 Posts

    Re: Image Gallery Clean Install Link to this post

    Hi All,

    I'm helping debug this issue for africansafari, and it looks to me like a conflict between Prototype and jQuery. The various lightbox scripts are having a good old whinge about "$ is not a function" in the Firefox error console.

    The site is using forms on most pages, which as I understand introduced the prototype code into the mix. We are already using jQuery.noConflict(); to get Prototype playing nice with jQuery (which we use for another script), however *most* of the lightbox scripts in the image_gallery plugin are using the $() notation rather than jQuery() notation so noConflict won't help here.

    The ShadowBox option uses jQuery() though. So for everyone else, we managed to solve (or at least workaround) the issue by switching the gallery to Shadowbox, and making sure that the following code is inserted after jQuery has loaded:

    <script type="text/javascript">
    jQuery.noConflict();
    </script>

    Hope that helps someone. I'm open to any better suggestions by the way - I understand SS are trying to remove Prototype in a future release, would be nice to slim down the site by not loading 2 competing JS libraries.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Clean Install Link to this post

    FYI, this:

    <script type="text/javascript">
    jQuery.noConflict();
    </script>

    does nothing unless you return it to something.

    <script type="text/javascript">
    $J = jQuery.noConflict();
    </script>

    $J('#my-selector');

    I should probably go through and make all the image gallery scripts Prototype compliant, though. That's a good idea.

  • Sadu
    Avatar
    Community Member
    5 Posts

    Re: Image Gallery Clean Install Link to this post

    Hmm, you sure?

    The site uses the code I posted above, and it works. I'm pretty sure you only need to specify a return variable if you don't want to use the default of 'jQuery'.

    But I could be wrong. I don't make a habit of mixing javascript libraries.

    Thanks for the prompt response, appreciated.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Clean Install Link to this post

    If I'm not mistaken, $ is an alias for "jQuery" out of the box. I don't think you need to do the noConflict().

    My favorite workaround, though, is this one:

    (function($) {

    // any code you want here using $ as a jQuery object

    })(jQuery);

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