I click on an event and it comes up in a colorbox window, then I close the colorbox popup window and return to the calendar. But now the calendar is duplicated on the page. Actually, every time I click on an event it adds another instance of the calendar to the main page -- so I might have multiple calendars trailing each other. Why is this happening? Do you have any solutions?

Here is a screenshot showing one calendar with the top of the next one below it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

When Colorbox closes, it re-runs the fullcalendar script.
We need to add a .fullcalendar-processed, and check for it.

tchopshop’s picture

Do you think the multiple instances of Full Calendar on a page are what would be causing a "slow script" error in my browser? Because that has happened to me several times, forcing me to have to force quit my browser, since it completely stalls trying to run the javascript.

tim.plunkett’s picture

Title: Full Calendar doubling on page » FullCalendar doubling on page
Version: 6.x-1.3 » 7.x-1.x-dev

Very likely, especially if you have a lot of nodes.

This will be backported rather quickly, but the development is happening in D7 at the moment.

tim.plunkett’s picture

Status: Active » Needs review
FileSize
732 bytes

Wow D7 is awesome, it includes the once() library.

This is going to be a pain to backport.

tchopshop’s picture

Thank you for all your work...

How long do you think I need to wait for this backport? (I'm not a programmer, or I would help you!!!)

I really don't want to have to go back to the regular calendar module... but my client's site goes live at the end of this month.

tim.plunkett’s picture

FileSize
749 bytes

Less than an hour is pretty good...

tchopshop’s picture

Wow! you are an amazing man!

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Both are rdy to go!

tchopshop’s picture

Status: Reviewed & tested by the community » Needs review

You are so quick!

But maybe I am doing something wrong...

I applied the patch, but it is still doubling the calendar on the page. Is there some secret configuration I'm missing now?

And maybe I'm mistaken, is this patch attempting to solve the doubling problem, or another issue with colorbox (like showing the full page instead of just the content)? I had solved that problem by creating a blank page template for colorbox that only showed content, with no page surround.

tim.plunkett’s picture

tschopshop:
The full page part is being handled in #910494: Colorbox version and settings.

Once you apply the patch, and clear the cache, this should work.
Can you try it again and make sure?

admin/settings/performance to clear the cache.

tchopshop’s picture

Yes, I definitely cleared the cache... several times...

Do you want me to give you any more info? I wonder if it's some other conflict.

:(

geerlingguy’s picture

Status: Needs review » Reviewed & tested by the community

Fixed the problem for me - applied the patch to the latest FC stable release (D6 branch), cleared all caches, and the problem went away completely.

tchopshop’s picture

Maybe I should start again with a new installation. But I'm just double checking in case I missed something... do I just apply the patch from #6 by itself, or do I apply this patch in addition to another one (like the one from #4)?

aspilicious’s picture

only 6 is needed. Do you have an online link to the calendar?

tchopshop’s picture

Hi there, I'm testing it locally. But maybe I will move it to the test server, if it comes down to that. But here's some more information -- the version I'm applying it against is from some time in the fall -- November, I think.

And when I update the code to the most recent version to get the file to which the patch applies, all our events disappear as soon as the fullcalendar script executes.

In November when we implemented Full Calendar we patched the module to support repeating events, color-coding, and our simplified template for Colorbox (because we couldn't use the module with it bringing in a full page inside the Colorbox). All those patches no longer work with a new version of the code.

Not sure what to do next, but maybe I should set up a new trial site with new code, to see if we can get the functionality we need, before attempting to bring it into our system.

thank you for your help, I hate to be such a burden....

tim.plunkett’s picture

tchopshop, have you ever been on Drupal IRC? Sign on tomorrow if you can and ping me, timplunkett.

Repeating dates and color-coding are both currently possible, and the simplified Colorbox is coming soon.

This is why you never hack a module! :) Feature requests are your friend.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed
tchopshop’s picture

thank you for helping Tim!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.