By ckleiman on
I recently converted a Wordpress theme to my Drupal site following the instructions in this thread; http://drupal.org/node/313510
Per the instructions I put the following into the <Head> section of the theme's page.tpl;
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<?php print $scripts; ?>
The problem was the <?php print $scripts; ?> was giving me a blank white page. Removing it gave me my theme back.
So that problem was solved.
The remaining problem is in the admin blocks page. No cross hair handles to move the blocks around. It seems you need the scripts function for the handles to appear.
What to do?
Comments
You need the $scripts
You need the $scripts variable in order to include any JavaScript.
Have you checked the 'Recent log entries' to see if Drupal caught any errors when you got the WSOD (White Screen of Death)?
If there isn't anything in the Drupal logs, do you have access to the apache error logs?
--
Read more at iRolo.net
This may sound like a dumb
This may sound like a dumb question, but, where can I find the Drupal logs? When I click Logging and Alerts in System Admin I get nothing.
Do you have the 'Database
Do you have the 'Database Logging' module turned on? If not, you should. Then, go to Admin -> Reports -> Recent Log Entries (/admin/reports/dblog).
--
Read more at iRolo.net
Apache error log white screen
Apache error log white screen of death:
[Tue Apr 26 14:43:25 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/drupal-6.11/sites/all/themes/Asian_Pro_Night/css/default.css, referer: http://localhost/drupal-6.11/sites/all/themes/Asian_Pro_Night/style.css?m
Apache error log site ok
[Tue Apr 26 14:46:19 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/drupal-6.11/sites/all/themes/Asian_Pro_Night/css/default.css, referer: http://localhost/drupal-6.11/sites/all/themes/Asian_Pro_Night/style.css?m
I notice the same error log for both scenarios so I found the default.css file and put where supposed to be and still same problem only now it says can't find base.css in /Asian_Pro_Night/ so I put that file there and now it says it still can't find.
When I remove the scripts from the page.tpl the site comes back as usual.
Two things: 1. The CSS is
Two things:
1. The CSS is included with the $styles variable, so these errors are almost definitely not related to your problem.
2. A missing CSS file shouldn't cause the whole page to go blank, unless the missing CSS is causing you to print white text on a white background, or something similar.
--
Read more at iRolo.net
What do you see when you look
What do you see when you look at the page source on the white screen of death?
Contact me to contract me for D7 -> D10/11 migrations.
The source code is identical.
The source code is identical. Only problem is just a white screen of death.
We are not talking about the
We are not talking about the PHP "source" code. When you load the page, go to View -> Source in your browser. Is there anything there?
--
Read more at iRolo.net
Yes, I was talking about the
Yes, I was talking about the View page source in browser. The source code is all there. Just like when working. Only problem, white screen of death.
BTW, if this helps, I'm doing all this experimenting on my computer localhost using Wampserver. I want to test and verify b4 uploading to my server.
I have a funny feeling,
I have a funny feeling, please post all of your code from page.tpl.php.
--
Read more at iRolo.net
<!DOCTYPE html PUBLIC
Where is the $scripts
Where is the $scripts variable?
--
Read more at iRolo.net
if I put this variable in I
if I put this variable in I get the white screen so you're looking at the "working" page.tpl
As soon as I put it in the
<Head>section right after the style variable and refresh the browser I get the white screen.It doesn't seem to matter if I put the scripts variable in the
<head><body>or elsewhere it still gives me the white screen. Just remove it and my site comes back without moving side handles on the blocks page.Can the block order be changed in the data base?
You need to find out why the
You need to find out why the $scripts variable is breaking your site. It is responsible for a lot more than just re-arranging blocks.
I think there may have been a misunderstanding earlier. When you add the $scripts variable, do you get any HTML output at all, or is the View -> Source completely blank?
And again, when you add the $scripts variable, does anything new show up in the error logs, either Admin -> Reports -> Recent log entries, or the apache error logs?
--
Read more at iRolo.net
Also, please post all of the
Also, please post all of the generated HTML between your opening tag and your closing tag.
--
Read more at iRolo.net
<!DOCTYPE html PUBLIC
Again, what does the source
Again, what does the source code look on the page when it is the white screen of death?
Contact me to contract me for D7 -> D10/11 migrations.
I've posted it already. Look
I've posted it already. Look above your post and you'll see.
Where? You hadn't shown any
Where? You hadn't shown any html source before the post where you said you had posted it already.
Load the code that gives you the WSOD, then right click the page and click 'view source' (just 'source' in some browsers). Copy and paste that here.
Contact me to contract me for D7 -> D10/11 migrations.
<!DOCTYPE html PUBLIC
Ok. That page loads fine on
Ok. That page loads fine on my system, which means that something in one of your javascript files is wiping everything out. Try disabling your modules one at a time and refreshing, to track down which module is adding javascript that is causing the WSOD. From there the javascript itself can be debugged.
As a side note, what browser are you using?
Contact me to contract me for D7 -> D10/11 migrations.
Am using Firefox latest
Am using Firefox latest version. Will do as u suggested and let u know. Thanks for your help.
Can't even get to Admin modules page. Keeps timing out even though have increase timeout in php.ini so tried on my live site. The script function didn't take out the site but still gave me WSOD on Admin Blocks page. Tried disabling modules one by one with same result.
Everything else on site seems to be ok so if this the only problem rather than spend more time to fix than its worth is it possible to reorder the blocks in the database?
Try increasing the memory in
Try increasing the memory in php.ini.
Contact me to contract me for D7 -> D10/11 migrations.
Now that I stop and think
Now that I stop and think about it the countdown module didn't work with this theme either. It would show ok, but, the seconds weren't counting live so it just showed a static time. Yes, I think you're on to something about this being a javascript conflict.
When posting the source code,
When posting the source code, both PHP and HTML, please only post the <head> part, for now. That is almost definitely where the problem lies. Posting the entire page is making this thread a lot harder to read.
--
Read more at iRolo.net
I've noticed the following in
I've noticed the following in the
<head>section. Without the scripts function I see the following when I view source;When I add the scripts function I get the WSOD and everything above plus the following:
Is this normal that the Scripts function would add these additional lines? What do you think?
Okay, now we are getting
Okay, now we are getting somewhere. This final script tag is never closed, and that is why the rest of the page is not being rendered.
What version of Drupal are you running?
Are all of your modules up-to-date?
Do you have any custom modules that did not come from drupal.org?
Did you modify any of the template functions?
--
Read more at iRolo.net
I just checked and this
I just checked and this doesn't make any sense. For settings, the ending script tag is output on the same line as the $embed_suffix. There is no way that one would be output and not the other.
Are you sure you copied all of the code that was added by the scripts variable?
--
Read more at iRolo.net
Sorry, I didn't copy
Sorry, I didn't copy completely. Here is rest of output from WSOD:
Am using Drupal 6.11 with following modules enabled;
Gallery embed 6.x-1.0
PNG Behave 6.x-1.7
Nodes in Block 6.x-1.2
Quick Tabs 6.x-2.0-rc3
PDF 6.x-1.10
Taxonomy 6.x-2.3
Countdown 6.x-1.0
Agenda 6.x-1.4
I also have a few of the core modules enabled all version 6.11
Hope this helps.
Okay, I am stumped. This is
Okay, I am stumped. This is probably something that an experienced developer could solve in 5 minutes if they were sitting at your machine. Unfortunately, I can't spend any more time on this. Maybe someone else can help?
In the meantime, here are some things you can do:
--
Read more at iRolo.net
I agree
I agree. We can't continue to spend time on things like this or we'd both go broke. You've given me some good ideas to check out when I have more time. Thanks for all your efforts!
As I said before, you need to
As I said before, you need to track down the problem. Disable your modules one at a time, refreshing the page on which this is happening. You should be able to track down the issue this way.
Contact me to contract me for D7 -> D10/11 migrations.
Appreciate all your help. At
Appreciate all your help. At this point I'm debating upgrading to Drupal 7 or switching to Wordpress for a number of reasons this being just one.
I'm frustrated with how Drupal makes things so complicated. I just want a simple CMS and don't have time for all this bs.
At least with Wordpress upgrades can be done automatically.
Also, the theme is a WP theme so no problems with script functions etc. if used in WP
What r ur thoughts?
The easiest way to tell if
The easiest way to tell if Drupal isn't right for you is if you are feeling that it's not right for you. Sound like you're feeling that way - why not play with Wordpress for a while.
Contact me to contract me for D7 -> D10/11 migrations.
Good suggestion. That's
Good suggestion. That's exactly what I'm doing. Unfortunately, its a bit like starting all over, again. But, like u say, I need to find out for myself.
I was curious if you'd tried
I was curious if you'd tried WordPress and, if so, what were your thoughts compared to Drupal?
I've played with it myself.
I've played with it myself. Enough to know how to use the admin interface, and I played with coding for it. It's a really strong platform, if it wasn't, there wouldn't be the sheer number of users using it.
It's much easier to use than Drupal. It's also much easier to code for than Drupal. But, with that ease, comes lack of flexibility and extensibility. Basically, the more functionality and extensibility you add to a system, the more difficult it become to use. Since it sounds like you are having some troubles working with Drupal, you will probably find Wordpress easier to use. The only question will be whether or not it will have the flexibility and functionality you need. Most of the time, it is.
So play with it for a bit and see what you think. Worst case scenario, you come back to Drupal with a new perspective on it.
Contact me to contract me for D7 -> D10/11 migrations.
You're right about Wordpress
You're right about Wordpress being far easier to use. The theme I'm using comes with super fish drop down menus that are way cool and easy to create. The search engine index, script upgrades and module installations are done automatically. I especially like the way WP refreshes the pages almost seamless and super quick. Creating tabs was another breeze. Just install a module and insert short codes into the html.
I think u call tell I've decided Wordpress is right for me. Thanks for your input and supporting me on this decision.