simplenews.views.inc is currently included in hook_menu().
There's a known erratic race condition where the exposed data is missing when views requires it.
See http://drupal.org/node/189311 for a similar issue that got fixed in VotingAPI.
CCK, OG have been doing this for more than a year now, VotingAPI got fixed a few months ago too, so I'm setting directly as RTBC :-)
function simplenews_init() {
// only bother when we are not serving a cached page. check for which function that only exists afterwards
if (function_exists('drupal_set_content')) {
if (module_exists('views')) {
include_once(drupal_get_path('module', 'votingapi') .'/votingapi_views.inc');
}
}
}
Comments
Comment #1
sutharsan commentedThanks for the code. However I rather have the function to include simplenews_views.inc instead ;)
Attached patch is committed.
Comment #2
yched commenteder, right, including simplenews_views.inc will probably be closer to what users expect :-)
Thx.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.