I've installed version 2.5 of the theme and everything seemed fine. I just recently upgraded both the theme and a couple of modules (Date and Calendar) and now, using the theme Nitobe (and Amor_azul for that sake) gives me a blank page when selected. The site (Drupal 6.10) has no apparent quirks when the Garland or for example Wabi themes are selected.
I'd be more than happy to narrow down this further, but when Nitobe theme is selected, I get nothing! This is very difficult to work with. No php errors, and when inserting a test echo statement at the very top of page.tpl file, nothing more happens.
Tell me what to do to produce more information on what might cause this. The Nitobe theme is delicate, yet professional and I'd like it very mutch if I was able to use it.

CommentFileSizeAuthor
#4 error_log.png10.94 KBstenjo

Comments

Anonymous’s picture

Assigned: Unassigned »
Priority: Normal » Critical
Status: Active » Postponed (maintainer needs more info)

Are there any entries in Watchdog or your PHP error log corresponding to the time that you installed the theme?

stenjo’s picture

I have installed and un-installed the theme several times and I am not able to see any php error neither on the log or on the screen.
The only warning I can find is a "Page not found" -message with: files/languages/no_f208656e599ce5031ba264e392851038.js not found.
the php flag display_errors is on.

Anonymous’s picture

I haven't been able to reproduce this yet using either the release package or the CVS tree.

If you're seeing a WSOD (white screen of death) in Drupal, there is always an error in the PHP error log. The location of this log file is specified in your php.ini file.

Not all errors will make it to the output stream before PHP gets killed, so even with display_errors on, you can't rely on these errors showing up on the screen or in Watchdog.

If you have an error log specified in your php.ini file and error logging enabled, the error will be logged there.

stenjo’s picture

StatusFileSize
new10.94 KB

This is what puzzles me. The error log is practically empty. Only the warnings that the favicon.ico file is missing.
See illustration.
I have un-installed, installed, selected and deselected the theme several times during the period this log is for.

/Sten

Anonymous’s picture

Sten,

That looks like the Apache error log. Normally PHP logs to a different file (typically php_error.log). In the php.ini file, the error log file is specified with error_log = line. Also be sure that log_errors is set to On.

If you change the file being logged to, you will have to restart apache for the changes to take effect.

Thanks,
Shannon

stenjo’s picture

Thanks, Shannon, for helping me out here.

You are quite right! This is probably an Apache log. I've altered the .htaccess file to direct all php errors to a file I can get hold of, and deliberately created an error I knew PHP would report to check that PHP errors actually are reported.
Then I select the Nitobe theme, checked that I got the white screen, unselected the Nitobe and selected Garland, and verified that the front page was showing as expected. Opening the php error log: NOTHING! (Apart from the deliberately created php error message)
I have deinstalled and installed again - no error neither on screen nor in the log.

I Used to have the Nitobe theme working on version 2.5. Reinstalling the 2.5 version does not correct the problem. This leads me to think this is connected with me upgrading and uploading a few other modules at the same time. Note also that there is at least one other theme behaving the same way, so I do not think this is a particular problem for the Nitobe theme. However, something in the theme seems to create the situation, and I thought it would be a good angle of attack trying to solve the problem.

Any ideas where to start debugging? Any modules I should download that might give me some more informatin on what is going on?

/Sten

kenorb’s picture

Priority: Normal » Critical
Status: Active » Postponed (maintainer needs more info)

May this one will help to diagnose what causing the problem:
http://drupal.org/project/dtools

stenjo’s picture

This looks like a brilliant tool - more or less just what I need.
I have however managed to get the site up and running Nitobe again, and for the benefit of others that may have similar experiences I will describe my approach below:

  • I started off by inserting descriptive "echo" statements in the code at a place where this was echoed to the screen - I.e. before the page dies.
  • Then I move the echo statement down through the code, also echoing various variables to the screen at the same time. When nothing is echoed to the screen I know the statement is probably not executed - the page dies before this.
  • The statement I use is something like this:
    echo "Now in filename.php, function() at line just before call of function2() with parameter1=$parameter1 and param2=$param2";
    echo "<pre>"; var_dump($variable_that_may_be_an_array);    // In case the parameter or the variable is a structure or an object
    echo "</pre>";                                             // Cannot use print_r() because of output buffering
    

In my particular case I managed to find out that the page was failing when rendering a particular date field that was converted through a date module upgrade. It seemed like there was a views-theme failing due to a enormous (probably erroneous) node object being passed. When I removed that particular date field from the content type, the site started behaving normally - even when using the Nitobe theme.
Till this day, I do not know exactly what made everything fail when running Nitobe, and OK when running Garland, but removing the date field from the content type and inserting a similar type of field with a different name (have not tried the same name) seems to have done the trick.
I can now focus on developing the site, building further. It's going great!

Thanks a bunch for all the help and support. It is one of the main reasons why I always recommend using Drupal (in addition to the professionality of the system).

/Sten

Anonymous’s picture

Priority: Critical » Normal

Sten, Rafal,

Thanks for debugging this. I'm at DrupalCon and haven't been able to look into it.

It sounds as if there's an un-handled exception happening with the date formatting. I'm overriding it explicitly in Nitobe, and I think Garland just uses the default when it outputs it.

I'm leaving this one open and will address it when I get back to Austin.

Thanks again,
Shannon

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active
Anonymous’s picture

Assigned: » Unassigned
Priority: Critical » Normal

In template.php, the only place that a date on a node is formatted is here:

function phptemplate_node_submitted($node) {
  return t('!datetime — !username',
    array(
      '!username' => theme('username', $node),
      '!datetime' => format_date($node->created),
    ));
}

This is the exact implementation used in Garland, so there may be something else going on. Without an actual PHP error to look at, I'm not going to be able to debug this though.

There is a recently closed issue in the Date module's queue that is a possible candidate, but I don't know why it would happen only with some themes and not others:

#375551: date_format() error in 6.x-2.x-dev (2009-Feb-17)

I'm changing the status on this one until we can get a log file with the error.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Never got further info.

martinfrench’s picture

Version: 6.x-3.1 » 6.x-4.0
Status: Closed (fixed) » Active

Have identical problem to that described above.

All other themes work fine. Nitobe produces blank page and the following PHP error log.

This is brand new install of 6.14.

[16-Sep-2009 23:11:00] PHP Fatal error: Call to undefined function nitobe_read_more_link() in C:\www\docs\xxxx\themes\nitobe\node.tpl.php on line 23]

All help appreciated

Anonymous’s picture

It looks like you updated the theme, but did not remove the previous version before putting the new one in place. That function has been removed and node.tpl.php is now in a subdirectory.

Remove the theme completely by deleting the directory and then replace it with the new version.

martinfrench’s picture

Thanks Shannon, that sorted it.

Moral of story is don't undertake these tasks late at night when tired!

BTW - Nitobe IMHO is by far the most professional looking theme available so well done!

Anonymous’s picture

Status: Active » Closed (fixed)