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
Comment | File | Size | Author |
---|---|---|---|
#8 | 1268412-theme-registry.patch | 1.37 KB | merlinofchaos |
Comments
Comment #1
cvining CreditAttribution: cvining commentedWell, 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!
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedAre 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.
Comment #4
somatics CreditAttribution: somatics commentedI 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:
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:
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).
Comment #5
cvining CreditAttribution: cvining commentedYup, 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
Comment #6
somatics CreditAttribution: somatics commentedI 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 ?
Comment #7
somatics CreditAttribution: somatics commentedIs 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?
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedHmm. 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.
Comment #9
somatics CreditAttribution: somatics commentedThanks 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:
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedDrupal 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/.
Comment #11
somatics CreditAttribution: somatics commentedThanks 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):
Do you have a patch like the one above to address what looks to me like an analogous bug?
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedBecause the views data is cached, be absolutely sure you're clearing both the views cache and the theme registry.
Comment #13
somatics CreditAttribution: somatics commentedOkay, 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.
Comment #14
somatics CreditAttribution: somatics commentedStill 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:
It seems like the fix for the original error was pretty straightforward; can this one be fixed with something similar?
Comment #15
somatics CreditAttribution: somatics commentedIs 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!
Comment #16
merlinofchaos CreditAttribution: merlinofchaos commentedAh 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.
Comment #17
somatics CreditAttribution: somatics commentedThank 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?
Comment #18
merlinofchaos CreditAttribution: merlinofchaos commentedI committed the fix to Panels; the next -dev will be rolled at noon GMT, so any time after that. Will require clearing cache.
Comment #19
somatics CreditAttribution: somatics commentedOkay, thanks for the clarification! I will try to implement this Saturday afternoon ET US. Again, I really appreciate it!
Comment #21
somatics CreditAttribution: somatics commentedI 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!
Comment #21.0
somatics CreditAttribution: somatics commentedFixed Typo in the title.