I try to create a new view from template in the calendar module using the date field publish_on with no success.
After creation, in any display, the contextual filter seems to be broken.

Any idea ?
Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055’s picture

Hello,
In order to look in to this I need to know which Calendar module you are using. A quick search via http://drupal.org/search/site/calendar?f[0]=ss_meta_type%3Amodule returns an entire page of projects with 'calendar' in the title. Please can you give the exact name and post a link here to the module you are using.
Thanks
Jonathan

xadag’s picture

Hello,

I'm using this calendar module http://drupal.org/project/calendar

When i try to set a new calendar view from template base on the publish_on field, i had problems.
When i use a standard date field (like the created or modified date of a node), no problem.

jonathan1055’s picture

OK, thanks. Now I know which date/calendar module you are using.

After creation, in any display, the contextual filter seems to be broken.

When i try to set a new calendar view from template base on the publish_on field, i had problems.

What exactly happens? Are there any error messages? Can you attach a screen shot here. You need to make it easier for us to help you :-)

Jonathan

xadag’s picture

First i choose the option add view from template

After that i choose to create the template from the publish_on field from the base table scheduler (first screenshoot)

And then, after naming my new view, the screen with the configuration of each views displays says that the contextual filter is broken or missing.

This problem doesn't appear if i create it from the created, modified field of node.

Hope it will helps.

brenda003’s picture

I had this same issue.

It turns out if you create from template a view using created instead of publish_on, and then manually change the Contextual filter, it works fine. It seems this is an issue with however that template is created, which I believe is an issue with Calendar.

xadag’s picture

Where did you find the publish_on field when trying to update the contextual filter after creating the view from template based on create instead of publish_on. I'm unable to add a contextual filter on this field instead of created date.

Thanks!

brenda003’s picture

@xadag, sorry I wasn't more clear. The contextual filter should still be:

Date: Date (node)

Click it to edit it, and you can select which date field you want to use. In this case, Scheduler: Publish on.

xadag’s picture

Status: Active » Closed (works as designed)

Thanks !!

jonathan1055’s picture

Pleased you got it fixed.
Jonathan

jonathan1055’s picture

I've just tried to replicate this for my own knowledge. I created a view from a template based on 'created' field in node base table.
Then editted the contextual filter

scrolled down, unticked 'Content Post Date' and ticked 'Scheduler Publish On'.

Saved and the contextual filter confirms the new date selection

There were no errors but the scheduled content was not showing up in the calendar. Then I noticed that the nodes had a default filter of 'published=yes' which obviously has to be removed to allow the unpublished scheduled content to show.

Thought I would mention this, to assist anyone else, as displaying the scheduled content in a calendar is very nice way to present it
and I'm sure others will like to use it.

Also I put the status back to 'active' because it might be a problem in Scheduler that the view shows up in the template. There could be something we can do, and need to check with the Calendar module for more explanation, before closing this issue.

Jonathan

jonathan1055’s picture

Status: Closed (works as designed) » Active

[Editted the previous post to force the images to be shown with a better size]

jonathan1055’s picture

Title: Support scheduler module date in calendar view » Improve support for calendar view templates
FileSize
947.88 KB

Changing the title to better reflect the issue.

We know now how to create a view using a template for a different field then alter it to use one of the scheduler fields. But it would be nice to know how to fix the template that Views provides, so that users can create a view directly based on publish_on (which is the obvious thing to do, and which appears to be possible given the list of templates presented to the user).