Hi,

There is a provision in storm holiday to let other modules modify the holiday list. This is done through the following alter declaration in storm_holiday.module.
drupal_alter('storm_holidays', $holidays[$year], $year, $country);

i happened to notice this while trying to resolve this issue in Add OHM Holidays to Country Holidays in my sandbox project Storm OHM .

In order to replicate this, one would have to declare the above hook and test it.

Hmm...

Step 1: One can download the Storm OHM module using git and enable it.
git clone --branch 6.x-1.0-alpha1 http://git.drupal.org/sandbox/D34dMan/1309636.git storm_ohm

Step 2: add few holidays by visiting 'admin/settings/storm/ohm' ( ie, Manage Holidays).

Step 3: navigate to 'admin/settings/storm/contrib' expand 'Holidays Settings', click the checkbox saying 'Storm OHM holidays merges into selected Country Holidays' and save it.

Step 4: Now enable German Holidays module and select it as country in Holidays Settings.

Step 5: The holidays declared by Storm OHM doesn't shows up.

Step 6: now if one could execute the following piece of code...

<?php
$country = storm_holidays_consider_holidays();
$var = storm_holidays_get_holidays($country);
dsm($var);
?>

by inspecting the array we could see that the array DOES contain storm_ohm holidays... but somehow it gets lost when its trying to display them.

NB: As long as Storm OHM is outside storm contrib, it would not be a nice idea to change variables declared by storm contrib.

Comments

d34dman’s picture

Hi there, i was testing storm holidays and it came to my notice that one has to save twice to get the holidays working properly.

Thus in the first step one would have to select the country and save.
Then in the next step one has to enable the holidays ( either manually or by selecting a state) then save.

I am going through the code to figure out a workaround. Like to display the message after first save to enable the holidays would be a start.

Another thing that comes to my mind is regarding implementing a function in storm_holidays to update the holidays. That would resolve the issue storm_ohm is facing.

Now i am not asking you to work on your code to make my life easier. But i understand i do sound like one :P. Okay, so in case none of the maintainers are working on this issue, i propose you to change the status to "postphoned (maintainers need more info)" and change the category to "feature request".

If done so i will assign the task to myself and put forward a patch/workaround in few weeks time.

(Right now am working on Gantt Project importer. Intending to roll out in a week's time, so even if i assign this to myself i might not be able to work on it until next week or later...)