welcome guest
login or register

Add new reply

At some point I started to notice occasional problems when writing a new blog entry. Sometimes it happened that I wrote a new post, hit "save" and -poof- the site crashed back to the previous page and all the text was gone. No error messages, not a White Screen of Death, but just the page where I was before choosing "new blog post" in my admin menu. That seemed to happen randomly sometimes, and most of the time everything was fine. So I thought it might be just some glitch which will correct itself.

Alas, the problem has not vanished all by itself. It seems to be lurking around, and every now and then users also report similar problems with saving a comment. The site runs on Drupal 7, and I've been searching Drupal forums & issues, but can't find other people reporting similar problems. Which means either that there aren't other Drupal7 sites experiencing similar problems, or that I suck at searching =)

So far the only pattern I have found is that this problem occurs when saving new content. So the workaround is to save a short dummy content first, and then edit it. So, what ever the bug is, it seems to be restricted to adding new content.

From a general bug-hunting point of view, there are at least three possible sources of error:
1. the php running the site (ie. Drupal7)
2. the database storing the data (MySQL)
3. the server hosting both the database and the php.

If it was 1. I'd expect an error message either in the php error log, or in the drupal's internal error log. But browsing both of those error logs, I can't find a single message which could be related to this bug.

If it was 2., ie. a problem with the database (or with the php - database interaction) it would be strange for it to work with SQL update but now with SQL insert. Then, on the other hand, I have no idea if there is a MySQL error log somewhere on the server. I tried to look for it but couldn't find one. (yes, I've been too lazy to contact the webhosting service. And I'm not that experienced with any of the server side programming, I'm just learning as I go.)

Well, I've also been suspecting 3. as I know that the webhosting service has a whole pattern of automated spam-prevention measures. I remember that in the beginning I had to contact them couple of times, asking them to relax a rule or two for our site. For example, if a new user created an account, and first headed to write a private message using the message system for registered users, that was taken as an indication of spambot activity, and the user experienced half an hour of IP ban. I also got my own IP banned couple of times, after testing and configuring the site (apparently, it looked like a spambot hacking the site configuration). But those anti-spam measures always triggered a complete IP ban, you couldn't even read any content because your browser had no access to the site. But this is not the case with this "saving new content"-bug. It just crashes you back to a previous screen, but allows you to continue browsing the site, and you can even re-try posting the same comment after a second. So, that's why I have been thinking that maybe this is not because of the webhosting service having some too strict anti-spam measures.

But I don't know. So, in case some of you are interested in bug-hunting, let's do some testing. I still wonder if the bug is purely time-sensitive, or if there is a regular pattern to it. If it is purely time-sensitive, then one day the exact same comment could be saved but would crash some other time. But, if there is a pattern, then we can find what triggers the bug. This is what user Paulo Jorge said in his comment (the comment was posted under the previous entry "Coping with winter", I cut & pasted the comment here so we have all the fresh bug-hunting stuff in one place)

(just a placeholder for the comment)

I've been thinking about this, and indeed the "lesser than" and "greater than" symbols might be trouble. As, there is a filter which allows some html tags and rejects others. And since special chars are used to mark a html tag, some combinations might make the filter crash in an unexpected way. At the moment this is my best guess.

Anyhow, if we get this narrowed down, I hope it becomes clear if this something I can fix myself, or if I have to contact either the webhosting service or the drupal community. So, feel free to post test comments under this blog entry. I think we could test at least the following guesses:

a) contents with a link crash
b) contents with special characters like and crash - if so, what are the exact characters making the trouble
c) if you spend a long time writing your comment, something time-outs and the site crashes when you try to save

now I'm going to copy this text to clipboard and to hit save - let's see if it goes through

CAPTCHA
Please reply with a single word.
Fill in the blank.