Friday, 24 May 2013

Oh geez, not again


It's a serious disappointment when you feel happy and realize you still need to write a post. Drunk, used and mostly dead.


I feel the need to use trash-talk and just judge everything to hell. I had this horrible experience with features today. Not sure if I explained before, but had an interesting situation. When you enable features in an update hook, you may not get the feature enabled at the point of calling the function. And I've met the same problem again - cache. So you know, in Drupal you cache a lot of things. Lists, vars - and also modules.When you enable a feature, you do what you have to do, but them it's still the tip of the iceberg. No action is gonna be executed. I was suspicious of the Drupal queue. But it turnet out, it's cache. When you try to refresh a feature, you know, reverting it, you call all sorts of stuff, including loading available features. At this point the list of features are already cached, so you have the limited selection. What you need to do is only calling features_get_info with the reset parameter, so you refresh the cache. And now you can revert it. It was a tough fight but at least I know how to handle it - and I didn't have to use the Drupal queue - so that's a good thing.

I'm horribly tired, it's far after midnight, and absolutely no willing to write.

---

Peter

No comments:

Post a Comment