Download & Extend

Enabling views crashes whole site - only plain text error message (smoking ruin)

Project:Views
Version:6.x-2.6
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi, I'm just building a fairly basic drupal 6 site, and I just enabled CCK and some sub modules and the whole site just started giving this error

Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/views/theme/theme.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/headchip/public_html/sites/all/modules/views/views.module on line 24

I searched for this error in google and it came up as no results, which was a little surprising, so I thought i'd post it here just in case anyone knew what was going on.

Comments

#1

I see the same since a few days, maybe since D6.14, not sure about the precise timing. Disabled some modules I thought could cause this but haven't resolved it yet and my logs are full of lines such as the following one:
[27-Oct-2009 03:35:59] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required './sites/all/modules/cck/theme/theme.inc' (include_path='.:/usr/share/pear:/usr/share/php') in /PATHTOMYSITE/sites/all/modules/cck/content.module on line 177

#2

I wiped the site and started again, and it did the same thing as soon as I switched views on.

#3

Project:Drupal core» Views
Version:6.14» 6.x-2.6
Component:base system» Code
Priority:normal» critical

It sounds like you have a different issue, you have cck crashing at line 177. There seems to be a similar error on 525544, but with their error views is crashing on line 512. What is line 24 of views...?

require_once "./$path/theme/theme.inc";

I'll move this post to the views area and see if we get any attention. As this error seems theme related (?) I'll record that I was running toasted before the crash. Drupal was 6.14. Next step would be to wipe install and try enabling views with a default theme running...?

#4

Actually is probably a duplicate of 525544, as inital problem was view being in the wrong directory. Once correct it gave the line 24 error, and someone else posted with the same views line 24 error. That's posted in the installing drupal area and is unanswered.

This particular site of mine was installed using "simple scripts" on a consumer hosting package, which may be the root of the problem, I have already posted on their support forum, too.

#5

Title:whole site gives plain text error message» Enabling views crashes whole site - only plain text error message (smoking ruin)

#6

You're right, thomasmurphy, my issue is with CCK; sorry.

#7

But to be fair, we both have problems with the "/theme/theme.inc" path.

Do you also get a plain text error message with no way to access the site admin to try to fix the problem?

What theme were you running before the crash?

#8

Status:active» fixed

Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/views/theme/theme.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/headchip/public_html/sites/all/modules/views/views.module on line 24

This error indicates that you are missing files and that Views is not installed correctly. Please ensure you have all the files from the tarball; Views has several subdirectories and a lot of files.

The first thing to do is make sure the file it references ./sites/all/modules/views/theme/theme.inc -- if it is not there, then it is 100% user error.

#9

hey, thanks for your observation, i checked it and it was 100% user error indeed, my FTP client must have had an off day.

That said, it's a pretty brutal error, rather than the module just not working or drupal saying can't enable the module...? Just a suggestion. thanks.

#10

Well. It is, but checking for these files would cause performance hits on every page. There's a lot of files to check for. I don't think that's really a good idea.

#11

Hey, you are no doubt right, I wasn't really seriously suggesting anything like that. I am a big views fan in general, thanks. I only made the suggestion as this error would have been quite off-putting for someone new to drupal, perhaps it might give the people who think about such things an idea sometime.

I don't know enough about how drupal manages its modules to think of a way that it could "realise" that a module was broken and switch it off/ingor it rather than just give a plain text file not found error. Could there be a process that listens for fatal errors like these and translates them into something closer to english and possibly disables the offending module...? I am musing now!

#12

Status:fixed» closed (fixed)

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

#13

EDIT : SEVERAL modules were corrupted. Bloody FTP!!!

Same problem and solution for me (I hate gFTP). But with one inconveniance: even after reuploading, I still have this error on the performance page (admin/settings/performance) or the module page (admin/build/modules), but not on the theme settings. It happens when I click on save changes (even if I did not change a thing). Reloading the page fixes the issue, but still… What is going on?

Specifically, the problem always comes from /includes/theme.inc on line 286, which is:
  $vars['rows'] = array();

It looks like something about a table. My intuition is that it is related with some of those green confirmation messages one gets when applying a change. Which is a pretty bad news, because it may appears everytime someone posts a comment…

I have no idea how to fix it. Could it be a problem with Garland?

I don't know what to do… Did anyone get this issue too?