Warning associated with 'views_content.views.inc ', generated with any view, after upgrade to D7

Curiously, the views & panels themselves seem to be generated correctly.

I've a fairly complex site, using views and panels which rely on ctools. I'm still squishing bugs associated with an upgrade to D7, and here's my latest bug: any page with a view throws warnings like this one:

Warning: include_once(/home/tesociet/public_html/drupal-7.8/sites/all/modules/views/theme/views_content.views.inc) [function.include-once]: failed to open stream: No such file or directory in theme() (line 807 of /home/tesociet/public_html/drupal-7.8/includes/theme.inc).

The warnings go away if I disable the 'Views content panes' module (a part of Ctools). I've found quite a few people reporting what looks like the same problem (Ex: http://drupal.org/node/1033312), but with no resolution, and they don't seem to have even figured out what module is responsible.

Now, I also rely on the 'Views content panes' module to allow me to assemble nice panels from individual views. So I'd like to get this one squished.

Things I've noted and tried:

- uninstalling everything up to and including ctools and views didn't help.
- using the latest .dev versions didn't help
- disabling all the views except one didn't help.
- even when the view doesn't use the 'views content panes' module, I still get those warnings.
- I failed to reproduce this with a fresh D7 install and creating some simple views & a panel, so maybe it has something to do with the upgrade process.

I
the key file is

sites/all/modules/ctools/views_content/plugins/views/views_content.views.inc, because changing the 'theme path' statements affects what Warning message is generated. It looks to me like this is all an attempt to support theming by pointing to a default views-view-tpl.php file in the modules/views/theme directory.

Curiously, the views & panels themselves seem to be generated correctly, which again would be consistent to a mistake in pointing to the correct tpl files used by themes.

I'm hoping someone familiar with the source might be able to sort this out pretty quickly.

Thanks for your attention.

-- Cronin

CommentFileSizeAuthor
#8 1268412-theme-registry.patch1.37 KBmerlinofchaos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cvining’s picture

Well, as a temporary work around I renamed the offending include file:

modules/ctools/views_content/plugins/views/views_content.views.inc.orig

my guess is that this breaks some theming, (hmm: that word looks more like them-ing, but you get the idea) but otherwise seems OK. And those darned Warnings are gone, so I can move forward for now!

merlinofchaos’s picture

Are you actually using latest CTools -dev? I thought I had fixed something like this already.

It looks like Views is somehow incorrectly registering a theme function for maybe the context display style. With your fix, you won't be able to use the Context display.

somatics’s picture

I too am having this same problem. I also have a complex site that relies heavily on Panels, Views, & thus Ctools.

Since upgrading it to Drupal 7 (I'm at 7.8 now), I have consistently seen the exact same error:

Warning: include_once(/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc) [function.include-once]: failed to open stream: No such file or directory in theme() (line 807 of /drupalhomefolderpath/includes/theme.inc).

In fact, my dblogs show no errors or problems for any other modules or issues (an exciting, and I'm sure fleeting, accomplishment indeed!) except for this one error and one other:

Warning: include_once() [function.include]: Failed opening '/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc' for inclusion (include_path='.:/opt/php/pear') in theme() (line 807 of drupalhomefolderpath/includes/theme.inc).

I don't know if this additional error sheds any light on this problem or not; or if it's completely unrelated. I have pages and pages of nothing but these two errors, alternating one after the other, with no other errors logged. I have not made any changes to modules names or other code.

I am using the Dev releases of all three modules from just a few days ago (as of Sep 2, I think).

cvining’s picture

Yup, I'm using the latest dev of all the required modules. For me, renaming that .inc seems satisfactory for now, but I appreciate it's not a genuine fix.

-- Cronin

somatics’s picture

I am eager to get rid of this message, even temporarily while waiting for the bug to be fixed.

I hope this isn't a dumb question, but in the interest of getting myself into a quagmire that's above my skill set to even keep track of the effects I have, here goes: Since my error message references a different file, do you have any ideas how I should rename what file?

My warning is:

Warning: include_once(/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc) [function.include-once]: failed to open stream: No such file or directory in theme() (line 807 of /drupalhomefolderpath/includes/theme.inc).

Should I rename panels.views.inc ?

somatics’s picture

Is there going to be a fix for this? In the thread, #2 indicates this may be a simple fix, perhaps just a small amount of bad code referencing the wrong file, but it's almost 4 months later and this bug still appears to be rampant.

For our site's operation, this issue is incredibly disruptive, and important to eliminate: For example, for a 10-hour period we have 210+ pages of logs of almost exclusively this error. Consequently, it's near impossible to do almost any other kind of site monitoring, diagnosing, tuning, development, etc. We basically can't do anything with the site that involves knowing what else is going on in the logs. Could someone please comment on the status of this?

merlinofchaos’s picture

Status: Active » Needs review
FileSize
1.37 KB

Hmm. I think my fix to Views for this got unfixed at some point, and changed to something else. :(

Try this patch. You'll need to clear the theme registry after applying this patch for it to take efect.

somatics’s picture

Thanks for getting back on this so quickly. I tried to apply the patch and it failed. I hope this isn't too stupid a question to post, but I don't want to try to alter the patch and mess it up -- I want to avoid adding any more variables to the experiment (especially if they break something!).

It looks like the problem is there's an a/ and a b/ before the path for the old and the new code; however, that seemed to obvious and I figured that must be there for a reason. So, if you would be so kind as to hold my hand on this one and tell me what I need to do to run this patch properly, I'd really appreciate it.

Here's the transcript of the failure:

userx:~/public_html/drupal/sites$ cd all/modules/ctools
userx:~/public_html/drupal/sites/all/modules/ctools$ ls -al
total 156
drwxr-xr-x  17 userx virtwww  4096 Dec 30 09:37 .
drwx--x--x 108 userx virtwww  4096 Dec 21 02:08 ..
-rw-r--r--   1 userx virtwww  1407 Dec 30 09:37 1268412-theme-registry.patch
-rw-r--r--   1 userx virtwww  1637 Dec 14 06:39 API.txt
-rw-r--r--   1 userx virtwww  5167 Dec 14 06:39 CHANGELOG.txt
-rw-r--r--   1 userx virtwww 18092 Dec 14 06:40 LICENSE.txt
-rw-r--r--   1 userx virtwww  2886 Dec 14 06:42 UPGRADE.txt
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:39 bulk_export
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:39 css
-rw-r--r--   1 userx virtwww  5264 Dec 14 06:40 ctools.api.php
-rw-r--r--   1 userx virtwww   362 Dec 14 06:40 ctools.info
-rw-r--r--   1 userx virtwww  5986 Dec 14 06:40 ctools.install
-rw-r--r--   1 userx virtwww 25665 Dec 14 06:40 ctools.module
drwxr-xr-x   3 userx virtwww  4096 Dec 14 06:39 ctools_access_ruleset
drwxr-xr-x   5 userx virtwww  4096 Dec 14 06:40 ctools_ajax_sample
drwxr-xr-x   3 userx virtwww  4096 Dec 14 06:40 ctools_custom_content
drwxr-xr-x   4 userx virtwww  4096 Dec 14 06:40 ctools_plugin_example
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:40 help
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:40 images
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:40 includes
drwxr-xr-x   2 userx virtwww  4096 Dec 14 06:40 js
drwxr-xr-x   8 userx virtwww  4096 Dec 14 06:41 page_manager
drwxr-xr-x   9 userx virtwww  4096 Dec 14 06:42 plugins
drwxr-xr-x   3 userx virtwww  4096 Dec 14 06:42 stylizer
drwxr-xr-x   3 userx virtwww  4096 Dec 14 06:42 tests
drwxr-xr-x   3 userx virtwww  4096 Dec 14 06:42 views_content
userx:~/public_html/drupal/sites/all/modules/ctools$ patch < 1268412-theme-registry.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/views_content/plugins/views/views_content.views.inc b/views_content/plugins/views/views_content.views.inc
|index f4d7fcb..6724d3c 100644
|--- a/views_content/plugins/views/views_content.views.inc
|+++ b/views_content/plugins/views/views_content.views.inc
--------------------------
File to patch: 
Skip this patch? [y] y
Skipping patch.
3 out of 3 hunks ignored
merlinofchaos’s picture

Drupal patches are created with git. Ideally you have a git checkout and you use git apply

When using patch, you must use patch -p1 < patchfile to strip off the a/ and b/.

somatics’s picture

Thanks for the "idiot's guide to...". I really appreciate it!

I made the patch successfully. However, I am still getting a stream of errors. This pair of errors is repeated over and over again (2 pages of dblogs in less than 5 minutes so far):

Warning: include_once(/serverdirectory/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc) [function.include-once]: failed to open stream: No such file or directory in _theme_process_registry() (line 537 of /serverdirectory/drupalhomefolderpath/includes/theme.inc).

Warning: include_once() [function.include]: Failed opening '/serverdirectory/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc' for inclusion (include_path='.:/serverdirectory/.php/pear:/opt/php/pear') in _theme_process_registry() (line 537 of /serverdirectory/drupalhomefolderpath/includes/theme.inc).

Do you have a patch like the one above to address what looks to me like an analogous bug?

merlinofchaos’s picture

Because the views data is cached, be absolutely sure you're clearing both the views cache and the theme registry.

somatics’s picture

Okay, I just cleared the Views cache, twice. Then I flushed the Theme Registry using the option under Flush All Caches under the Drupal icon drop down menu on the Administrator Toolbar, also twice.

The logs have not changed -- still a constant, multiple times per minute stream of those two error logs.

somatics’s picture

Still having these errors, and I'm wondering if it needs another fix like the patch you provided, but for a different path. My errors are slightly different than the main one for this post (and apologies if this should be in a different post): They reference the the folder but a different file within -- views/theme/panels.views.inc rather than views/theme/views_content.views.inc:


Warning: include_once(/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc) [function.include-once]: failed to open stream: No such file or directory in theme() (line 807 of /drupalhomefolderpath/includes/theme.inc).

Warning: include_once() [function.include]: Failed opening '/drupalhomefolderpath/sites/all/modules/views/theme/panels.views.inc' for inclusion (include_path='.:/opt/php/pear') in theme() (line 807 of drupalhomefolderpath/includes/theme.inc).

It seems like the fix for the original error was pretty straightforward; can this one be fixed with something similar?

somatics’s picture

Is there any chance there's a fix to this coming soon?

This has been dragging down our site in myriad ways since August. We can't really proclaim our upgrade to D7 done, and are dealing with a lot of unhappy customers while this is outstanding and bogging down our ability to manage this site. Any help would be greatly appreciated.

Thanks!

merlinofchaos’s picture

Status: Needs review » Fixed

Ah yes. The reference to panels.views.inc probably means that Panels needs the same fix on its Views integration.

It looks like I inadvertantly committed this already. I'll also commit one for Panels.

somatics’s picture

Thank you! I really appreciate it.

Can you clarify what you are saying regarding where the fix is? It sounds like you're saying the Ctools fix been committed to a recent dev version, and that you are going to do the analogous fix in a near-future dev release of Panels. Is that correct?

Does this mean I should make sure my site has the latest dev release of Ctools in place, and wait a few days and then also obtain the latest dev release of Panels as well?

merlinofchaos’s picture

I committed the fix to Panels; the next -dev will be rolled at noon GMT, so any time after that. Will require clearing cache.

somatics’s picture

Okay, thanks for the clarification! I will try to implement this Saturday afternoon ET US. Again, I really appreciate it!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

somatics’s picture

I wanted to follow up and say that I was able to install this update and it stopped the flood of errors immediately. It was an awesome thing to behold. After months of this running our whole process with the site, I am really grateful this was resolved.

Thank you, merlin, I really really appreciate it!

somatics’s picture

Issue summary: View changes

Fixed Typo in the title.