0

In a D7 install profile, I am trying to modify the location of a exposed filter block with db_update(), where the view is defined by a module's hook_views_default_views().

At this point it doesn't seem views has collected the views from hook_views_default_views() or the view block does not exist (or db_update cannot address it) in the {block} table until I actually bootstrap Drupal after installation is complete. I have attempted:

  • Invalidating the views cache via views_invalidate_cache()
  • Loading the view with views_get_view(NAME)
  • Triggering drupal_cron_run()

Before issuing the db_update() with no success. I am not versed enough in views to understand at what point views writes the exposed filter blocks to the block table, or how to force it to do so.

I am employing 'cache' => DRUPAL_NO_CACHE, during my db_update() call.

Update : doing a views_get_view() cannot actually load the view. It appears that install profiles do not have access to views provided by hook_default_views.

Thanks.

0

Doing a views_get_view() cannot actually load the view. From what I can tell, it appears that install profiles do not have access to views provided by hook_default_views.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.