Commit d2e9b60f authored by Robert Rollins's avatar Robert Rollins
Browse files

Issue #2122511: Added additional error correction for 2.x to 3.x migration.

The update hook now also checks for importers which are set to the new parser,
but still have un-capitalized source keys. This will help users who forget to
run the database update before manually fixing the missing
DateIcalIcalcreatorParser warning.
parent b2c6c1cf
Remember, you have to map the UID source to the GUID target, and make it
unique, or your imports won't work!
If you're building a site that will be viewed by out-of-state users, and you
allow said users to set their own timezone, you'll want to set up your Date
fields to use the "Date's time zone" option. If you don't, then users who live
in a different timezone will be shown the times for your events in their local
timezone, rather than your events' timezone. This makes sense if your events
will be broadcast live to these out-of-state users, but if they need to travel
to your event, they may end up arriving at the wrong time.
Additional Notes:
The Feeds plugin was originally written by ekes, for the "iCal feed parser"
......@@ -157,7 +166,7 @@ module ( It was modified and
improved for Date iCal by coredumperror. In Date iCal 3.0, the plugin was
re-written from scratch to conform to the Feeds APIs.
At this time, Date iCal supports outputting iCal calendars only through Views.
At this time, Date iCal only supports outputting iCal calendars through Views.
To put an "Add to calendar" button on individual event nodes, try the
<a href="">Add to Cal</a> module, or follow
the instructions created by the estimable nmc at:
......@@ -68,13 +68,23 @@ function date_ical_update_7300() {
$importer_data = ctools_export_load_object('feeds_importer', 'all');
foreach ($importer_data as $key => $value) {
$importer = feeds_importer($key);
$config = $importer->getConfig();
if ($config['parser']['plugin_key'] == 'DateIcalIcalcreatorParser') {
$importer_config = $importer->getConfig();
$needs_update = ($importer_config['parser']['plugin_key'] == 'DateIcalIcalcreatorParser');
$processor = $importer->processor;
$processor_config = $processor->getconfig();
// Also update importers which use the new parser, but have un-capitalized
// sources. This can happen if the user didn't run the update, and then
// manually fixed the warning they saw, without fixing their sources.
if ($importer_config['parser']['plugin_key'] == 'DateiCalFeedsParser'
&& !empty($processor_config['mappings'][0]['source'])) {
$needs_update = (strtoupper($processor_config['mappings'][0]['source']) != $processor_config['mappings'][0]['source']);
if ($needs_update) {
// Update the mappings: the source keys are now capitalized.
$processor = $importer->processor;
$processor_config = $processor->getconfig();
// Source keys are now capitalized, so we need to update the mappings.
foreach ($processor_config['mappings'] as &$mapping) {
$mapping['source'] = strtoupper($mapping['source']);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment