I recently removed the "Add new date link" feature from calendar. See http://cgit.drupalcode.org/calendar/commit/?h=8.x-1.x&id=ab0ee2f4a42ecb8...

I discussed this together with @pjonckiere and we both agreed that, if we want this feature in the calendar module, it would need a complete rewrite.

In my opinion this feature introduces some functionality that would be better handled in a separate contrib.

A brief explanation of what this feature does:

An "Add new date link" field is available in the "calendar entities" handler settings, it gives you a dropdown with an option to place no link, or a link to any of the configured content types.

If you select a content type (let's take "Article") in that field, an "Add Article" action link is added to the page.

The fact that this is an action now, forced us to have this hacky workaround which involves hook_preprocess_date_views_pager(), sessions and hook_menu_local_tasks_alter(), which didn't seem like the right way to go. Check this docblock for a better explanation how this works:

/**
 * Implements hook_preprocess_date_views_pager().
 *
 * Creates a calendar_links array which is stored in the session and used
 * in calendar_menu_local_tasks_alter() to display the links as action items.
 * The links can be altered or deleted using hook_calendar_links_alter().
 */

It also adds a calendar link on nodes of the selected content type that points to the calendar view. Again since there is no obvious way to do this decently, we are using a variable_set per view now, this could cause problems if we had multiple calendar views. We want to keep any calendar settings in the view itself.

In this ticket I would like to discuss what we should do with this regression, should it be re-implemented or do we drop it in favor of a separate contrib.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geertvd created an issue. See original summary.

tedbow’s picture

Priority: Normal » Minor

Ok changing to minor. It seems like it was good idea to get rid of it.

As you say it is good idea to discuss if this should be put back in or put in contrib but there are bigger problems for now

Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)