Closed (fixed)
Project:
Drupal core
Version:
5.1
Component:
node system
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 May 2007 at 01:33 UTC
Updated:
30 Jul 2007 at 18:20 UTC
I have recently been tryig out some html modules and such to add static html in drupal nodes. I thought since drupal allowed html in its nodes that I would try posting a old static html page into a node to see how it worked. What it ended up doing was making every page on my site blank. No errors or anything. To fix this I had to go into the database and drop the html page from the tables. This also happened when I installed a work in progress module called RPG. Until a recent update installing the module would result in white pages on every page of the site, not just the one with the code in it.
Comments
Comment #1
Haggle commentedHere are the steps to recreate the process...
1. pick some static html or php code (which part of the code that causes the error I do not know.)
2. add a "page" node and paste html code into it
3. submit expecting a static html page inside a node.
4. Entire drupal site becomes blank pages.
5. FIX: drop all tables with the html/php code in them and clear cache.
Comment #2
inforeto commentedSites usually break when broken code is loaded for all pages, like in modules, blocks, themes and templates.
But pages with broken php code only execute when that individual page loads.
If you "promoted" it to the frontpage then the frontpage will break as well as any list with teasers like taxonomy pages.
Try to see if there's any pages that do not break.
For example, try to edit the node directly, or see if you can get to the admin pages, where you can simply unpublish it.
Unless the code ran in the theme or you had a broken block those pages shouldn't break.
You have to check how exactly you loaded your static pages.
If you just pasted some code in a node it would only run if you selected "php code" in the filters.
You must also see what code it was, perhaps it had javascript on it, or html head tags.
But again, that would only break that particular pages.
Try to remember of other recent changes that could have caused site wide effects.
For example, was RPG.module properly uninstalled? Did you use a new theme? custom blocks?
If you can't get to the admin pages, you are stuck with a manual removal of the code on the sql tables.
Was your code in several nodes? Where exactly you removed it?
Dropping tables will also drop everything on it, which is no sensible solution.
Usually the best practices are to have a backup, and a test site.
After fixing it, you should also check your error logs. php and mysql errors are left on the server logs.
On a shared server the support techs should be able to give you hints about the offending function.
Those errors usually include the module name, block or theme, so you can easily identify the culprit.
Comment #3
Crell commentedYou'll need to be more specific. Lots of sites use HTML in page bodies just fine, so there must be something specifically wrong with the HTML you put in the page or with your Drupal install. Can you try testing the HTML to see what makes it break? Does just a simple i or b tag break it, or does it have to be a full page with html and body tags (hint: don't do that anyway)? When you get a white page, check View Source to see if you're getting nothing (indicating the server died) or some garbled HTML that just happens to not render. What version of PHP/Apache/MySQL are you running?
There's no way to identify the bug if we aren't able to reproduce it specifically.
Comment #4
Haggle commentedIt was a full HTML site I uploaded for the hell of it. Seems this issue is specific to Firefox after some testing was done. I recently changed a user name and the whole site went blank. I loaded IE and it was all there and everything was fine. I think this issue isn't drupal breaking but adding code that firefox can't handle. I'll post more as I test.
Comment #5
Crell commentedUsing Full HTML means Drupal won't protect you against inputting HTML that is horribly invalid and will break the browser. Having a full page with
/code> tag inside the body of the page is horribly invalid and will break the browser. :-) It sounds like a combination of user error (using horribly invalid HTML) and the browser not handling that edge case (although I don't blame it). If Drupal is generating the HTML one would expect in that case (a full HTML page inside the content area within the body tag), then it's not a Drupal bug and this should be marked won't fix.Comment #6
Haggle commentedThe case was using a module to import a full html page expecting the module to modify the html to be drupal friendly. Was a mistake on my part and html works fine when using it in the correct context. html tidy with no formatting works best.
Comment #7
Crell commentedOK. If it's caused by an import module you usually want to file a bug against that module rather than Drupal core itself.
Comment #8
(not verified) commented