Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Views attached has been working fine. This week I updated the Views Module and right after updating I got the error message.
I had to go back to the old version of Views and the problem was solved. I have tried many times and it always happens when trying to get the latest version of Views.
Is views_attached incompatible with the new views? Is the fix coming any soon?
Many Thanks
Comments
Comment #1
Crell CreditAttribution: Crell commentedWhat (exact) version of Views did you update to? views_include() is a fairly core function and I can't believe that API would change...
No one else has reported an issue so I assume it's an issue with caching or module ordering or something like that rather than a bug in views_attach itself.
Also please paste in the complete error you're getting, including the file and line number.
Comment #2
Dave ReidMake sure you run update.php.
Comment #3
Lubas CreditAttribution: Lubas commentedI've got the same issue..
I ran update.php (twice).. It doesn't change anything
Fatal error: Call to undefined function views_include() in /Applications/MAMP/htdocs/*/sites/all/modules/views_attach/views_attach.module on line 188
Comment #4
eaton CreditAttribution: eaton commentedThis isn't something any of us seem to be able to reproduce - views_include() is a core function of the views module, and if it can't be found, Views itself is not loading correctly.
Comment #5
kr8tiv1 CreditAttribution: kr8tiv1 commentedI've got the same error after migrating my site from a Acquia Drupal stack install to a non-Acquia Drupal install. The Acquia stack installer includes Views. I suspect there is a difference between Acquia's version of views and the plain vanilla views which is causing a conflict plain vanilla views_attach module.
Fatal error: Call to undefined function views_include() in */sites/all/modules/views_attach/views_attach.module on line 188
Comment #6
kr8tiv1 CreditAttribution: kr8tiv1 commentedMy assumption was partially correct. It's related to the Acquia Stack Installer. It places a folder called "acquia" in the global Modules folder. I suspect there are other Drupal install customizations to the Acquia stack installer. I'll have fun duck hunting :-(
Comment #7
AntiNSA CreditAttribution: AntiNSA commentedIm receiving this too...
Comment #8
gcassie CreditAttribution: gcassie commentedI ran into this on a site recently. As a workaround, I disabled views_attach, ran the database updates, and re-enabled views_attach - site recovered.
Comment #9
asb CreditAttribution: asb commentedSimilar issue here when updating to Views 3: Only the administrative pages remain accessible, the normal pages give a WSOD. From Apache's error.log:
The code around line 188 is:
The update was run through drush, and running update.php didn't throw any errors. After the update, the site is just dead.
The approach from #8 does not fix the issue for me; disabling 'views_attach' still results in a WSOD, but now points to several core modules:
As it seems, the 'views_attach' related error might be just indicate for a symptom for something deeper, or the data structures created by 'views_attach' break something when the module isn't active. This might explain why it is so hard to provide a procedure to reproduce the issue (I successfully completed two updates to Views 3 on sites with 'views_attach').
I can not debug stuff like this; please suggest a more appropriate issue queue for this chain of "PHP Fatal errors" (it might not be the Views issue queue since none of the errors point to Views, and it might not be a core module since it is improbable that multiple core modules are affected at once by a not-yet-known bug). However, if
views_include()
is a core function of Views, this issue probably best fits to the Views issue queue.The only "workaround" for this issue is to not use Views 3 - downgrading to views-6.x-2.16 immediately restores the site.
Any suggestions are greatly appreciated!
Comment #10
danielb CreditAttribution: danielb commentedThe solution is to uncomment a line at the top of views/includes/plugins.inc
I have no idea what's going on and why that is commented out
Comment #11
bgogoi CreditAttribution: bgogoi commented1. removed the views_atatch module from module folder
2. run update - it worked worked
3. uploaded views_attach module again
4. run update again
it worked.