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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Image Gallery Clean Install


Go to End
Reply


14 Posts   2184 Views

Avatar
africansafari

Community Member, 30 Posts

14 June 2009 at 10:25am

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???

Avatar
UncleCheese

Forum Moderator, 4096 Posts

15 June 2009 at 6:27am

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.

Avatar
Sadu

Community Member, 5 Posts

23 June 2009 at 9:18pm

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.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

24 June 2009 at 2:03am

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.

Avatar
Sadu

Community Member, 5 Posts

24 June 2009 at 3:45am

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.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

24 June 2009 at 6:47am

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);

Go to Top