-1

The Views on my site were working perfectly until I updated a bunch of modules and now I get these errors and the views don't display:

Warning: include(/home/x/public_html/.tpl.php): failed to open stream: No such file or directory in theme_render_template() (line 1525 of /home/x/public_html/includes/theme.inc).

Warning: include(): Failed opening '/home/x/public_html/.tpl.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in theme_render_template() (line 1525 of /home/x/public_html/includes/theme.inc).

How would one debug this issue to get the view to show up again?

I went to the line 1525 in theme.inc and it shows this:

1517 function theme_render_template($template_file, $variables) {
1518   // Extract the variables to a local namespace
1519   extract($variables, EXTR_SKIP);
1520
1521   // Start output buffering
1522   ob_start();
1523
1524   // Include the template file
1525   include DRUPAL_ROOT . '/' . $template_file;
1526
1527   // End buffering and return its contents
1528   return ob_get_clean();
1529 }

The error is telling me some template isn't found, but how do I trace back to where this function got called to find the culprit module that's causing all my Views not to display?

1

Classic disabling modules one by one to see which update is causing the problem. After that, try the garland theme.

0

If update.php does not fix the problem, try running Registry Rebuild. This will ensure Drupal correctly knows where all the files it needs to load are located.

Also, when you updated modules did you follow the correct procedure, which is to remove the existing module files before installing new ones? If you don't do this it can cause unexpected results.

  • The problem is that the the template filename is .tpl.php, not (for example) page.tpl.php. Also, the OP is asking how to find the module causing the problem. – kiamlaluno Nov 6 '15 at 10:33
  • Surely he only wants to know which module it is,so he can disable it to fix the problem. If there's another way to get things working again, I would imagine that's more useful. But let's wait for the OP to chip in. – Alfred Armstrong Nov 6 '15 at 10:39
  • The question is clearly How do I trace back to where this function got called to find the culprit module that's causing all my Views not to display? Rebuilding the registry doesn't change the fact a module is using an empty filename for a theme template. – kiamlaluno Nov 6 '15 at 10:42
  • If I were the OP I'd care more about fixing the issue than debugging someone else's module. But I guess the original question is useful even so, in which case I agree mine is not a great answer. – Alfred Armstrong Nov 6 '15 at 10:54
  • The OP Is not interesting in debugging a module, but to find out which module is causing the error; he could simply want to disable it, and that is not debugging a module. – kiamlaluno Nov 6 '15 at 12:09
0

Perhaps you did not run the update.php script

so go to www.yourwebsite.com/update.php and update the database.

PS: Any time you update Drupal or any module, you should run update.php

--

If you did run the update.php script, then:

I assume you made a backup before upgrading both Drupal and the modules.

Maybe you should revert back to the backup and then upgrade them one at a time. (you can do this fast using Drush, if you like.)

You would need to revert back to the module versions that you were using before updating them. Hopefully, you backedup your /sites folders like you should.

--

Another possibility might be that you have module files missing, perhaps they didn't get uploaded for some reason. (connection timmedout ?)

  • This would not explain why public_html/.tpl.php is being loaded. Notice that the template filename is just the extension. – kiamlaluno Nov 6 '15 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.