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

ImageGallery and EventCalendar conflict


Go to End


7 Posts   1590 Views

Avatar
animasola

Community Member, 121 Posts

14 January 2010 at 9:09pm

Hi,

I have both the ImageGallery and EventCalendar modules installed. For my site, I placed the calendar on the sidebar so it is displayed on all the pages. When I visit my image gallery page, the calendar doesn't load or isn't shown.

I think the problem is that there is a conflict with the javascript libraries being used by the modules. Does anyone know which libraries each module is using? I tried to use the noConflict() function of JQuery in hopes that the conflict may be alleviated but to no avail, it didn't work.

Can anyone help me? Thanks! :)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

15 January 2010 at 3:53am

Shouldn't be a conflict.. They're both jQuery apps and they're both wrapped in closures. I'll get a test set up, and in the meantime, check Firebug for any JS errors and post them here.

Avatar
animasola

Community Member, 121 Posts

15 January 2010 at 2:37pm

Hi,

I have it set-up here already: http://ahonfoundation.com/beta/

When I go to the main page of the image gallery (http://ahonfoundation.com/beta/our-libraries/), the calendar is still working.

But when I view a specific album (http://ahonfoundation.com/beta/our-libraries/album/trippin), the calendar doesn't load.

Hope those links help. Thanks!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

15 January 2010 at 4:05pm

The problem is that there are concurrent instances of jQuery being loaded. EventCalendar is using its own, while ImageGallery is using the jsparty source. I have updated the repository with the changes that should resolve your problem.

CalendarEvent, line 66
Requirements::javascript('jsparty/jquery/jquery.js');

CalendarWidget.ss, line 1
<% require javascript(jsparty/jquery/jquery.js) %>

Avatar
animasola

Community Member, 121 Posts

15 January 2010 at 4:40pm

I don't quite understand what changes I have to make in the code. By CalendarEvent, line 66 do you mean CalendarEvent.php? I tried removing the line <% require javascript(event_calendar/javascript/jquery-1.2.6.min.js) %> from CalendarWidget.ss but it doesn't work. Also, if I remove jQuery from the calendar and make it use the library of the image gallery, then the calendar would not work for pages where the gallery is not present because the library isn't imported.

Thanks for all the help UncleCheese :)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

15 January 2010 at 6:16pm

No, don't remove any lines. Just change them, as specified in CalendarEvent.php and CalendarWidget.ss. I've checked the changes into SVN, so if you just run an update you should be fine.

Avatar
animasola

Community Member, 121 Posts

20 January 2010 at 3:03pm

Thanks UncleCheese! I just finished it.

By the way, you did the image gallery module right? Is album pagination ready? :)

And, if it wouldn't be such of a bother, I also need some help with this thread: http://silverstripe.org/all-other-modules/show/276837?showPost=277221

If you have the time, I was hoping you could help me there as well.

Thanks so much! :)