In the situation that multiple modules are being enabled at the same time, views fetch data is reset but the newly included files are not.

Encountered while trying to test an install profile with multiple modules with views.incs to add.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

Status: Active » Needs review
FileSize
1.17 KB
hefox’s picture

Title: Refresh views_include_handlers when _views_fetch_data is being reset so any new files are added » Refresh views_include_handlers when _views_fetch_data is rebuilt more than once in a page load
FileSize
643 bytes

nope, that didn't work because various things clear the views data cache outside of calling with reset = true

new approach is to see if the helper function is called more than once in a page load, and if so (indicating cache was cleared somehow) go and refresh handlers also

btopro’s picture

Issue summary: View changes

Also experiencing this; testing patch currently but have travis stack traces to show this is possible. My problem appears to be enabling Views and Editableviews during an installation routine -- https://travis-ci.org/drupalprojects/ecd/builds/64357323

btopro’s picture

Version: 7.x-3.x-dev » 7.x-3.11
Status: Needs review » Reviewed & tested by the community

Build passed now after applying path projects[views][patch][] = "https://www.drupal.org/files/1979926-views-reset_fetch_data-2.patch"

This is still an issue in 3.11

DamienMcKenna’s picture

Version: 7.x-3.11 » 7.x-3.x-dev

dawehner’s picture

Status: Reviewed & tested by the community » Needs work

I see, this fix makes sense, though it would be indeed helpful if we could document what is going on. This is not obvious, to be honest.

btopro’s picture

I think there's a race condition of sorts. During install profile, it installs 2+ views plugins that include views.inc's. It hits the first one, rebuilds via this function and goes "oh I know about everything". Then, the next one goes to fire / requires an include and it freaks out because its cache already claims to have loaded all the files but didn't.

I'd imagine this isn't JUST an issue for install profile but instead any project that says it has 2 views projects (that both include files) required to enable. This would be common in features or install profiles, anything with multiple dependencies to be loaded that have views includes of some kind.

SocialNicheGuru’s picture

I think this is in the current 12/2015 dev version already

dawehner’s picture

I think this is in the current 12/2015 dev version already

Right, this wasn't committed ...

DamienMcKenna’s picture

Bump.