Hello,

My problem might be a duplicate of this issue #1272976, I tried the fixes proposed with no success.

A long time ago I created a calendar view by cloning the one which is now deprecated, and it was (it is still) working.
I used it to show the events from my organic groups.
In the path I put: /node/%/calendar/month
In the menu I chose: Menu: Tab: Calendar

My only problem then was that a calendar tab was being displayed on each node of the website, but the individual organic groups calendars were working properly, and showing only the events related to the group. The other nodes of the website were showing a tab with a calendar but it was empty, no events were displayed.

Since the update, this calendar view still works (I changed Show calendar items to show calendar entities), I have the tab in all the nodes but now when the node is not an organic group, the calendar doesn't show up and the folllowing error message is diplayed when I click in the tab:

The requested page "/?q=node/93/calendar" could not be found.

As you mentioned that this behavior was fixed with the new release, I wanted to try it and created a new calendar by using the Views "Add view from template" as you explained.
I changed the following:
In the path I put: /node/%/calendar2/month
In the menu I chose: Menu: Tab: Calendar2

The second tab does appear in the nodes but I get the following debug message:

Debug:

'calendar_plugin_style: A date argument is required when using the calendar style, but it is missing or is not using the default date.'

in calendar_plugin_style->render() (line 221 of MY-DRUPAL-SITE-DIRECTORY/sites/all/modules/calendar/includes/calendar_plugin_style.inc).

followed by this error message:

Notice: Undefined property: stdClass::$date_pager_format in calendar_preprocess_date_views_pager() (line 125 of MY-DRUPAL-SITE-DIRECTORY/sites/all/modules/calendar/calendar.module).

To further test this issue, I decided to clone my first calendar view (done with the deprecated one),
I changed the following:
In the path I put: /node/%/calendar3/month
In the menu I chose: Menu: Tab: Calendar3

The third tab does appear in the nodes but I get the same previous following debug and error messages.

I think that it is not now possible to create new calendars or to clone previous ones.

If you google the debug message, you will see that thousands of websites are now showing it on production sites using the calendar module.

I am for sure doing something wrong, could you please tell me how to properly use calendar (I read the readme and install files)

Thank you

Comments

antony.lovric’s picture

RE:A date argument is required when using the calendar style, but it is missing or is not using the default date.'

Been there....I created a view and a block and kept getting those debug messages, I looked at the code and discovered I needed;

- add a 'Contextual Filter',
- set 'Provide default value' to 'Current Date'
- save, then preview.

drupalycious’s picture

Title: creating a new calendar view is not possible » "get group from context" option not working in old databases
Priority: Critical » Normal

Hello,

The module works indeed great in a clean fresh install, and I even get the calendar to show only on the group nodes and not all the nodes.

In my production website, I can get a calendar to be displayed on a specified path but as soon as I indicate that I only want it for the organic groups, the calendar disappear.

The problem seems to be that a module or an old setting inserted in my database prevent the option "get group from context" to work.

I have been digging (disabling, deleting, ...) since hours.

If someone has an idea, feel free to share ;-)

I have looked to the OG issue #1313166: OG group from node relationship does't load the context properly but then it works on a clean install so it is due to the database or a module.

drupalycious’s picture

Status: Active » Closed (duplicate)

I close this issue as I opened a new bug report where I tested a different approach to the problem.

#1511418: Calendar not working fully with the latest views dev version

arlingtonvoicellc’s picture

You just saved me a whole headaches worth of time!! Thank you. I was just getting ready to jump into the code when I came across your response. Tried it, and it worked like a charm.