Jump to:

10845 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » ImageGallery and EventCalendar conflict

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1057 Views
  • animasola
    Avatar
    Community Member
    121 Posts

    ImageGallery and EventCalendar conflict Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

    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.

  • animasola
    Avatar
    Community Member
    121 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

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

  • animasola
    Avatar
    Community Member
    121 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

    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.

  • animasola
    Avatar
    Community Member
    121 Posts

    Re: ImageGallery and EventCalendar conflict Link to this post

    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!

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