Using Drupal 4.6.5, I can create a node (a "story" node, if it matters), edit it several times - each time creating a revision. When there is more than one revision existing - I can delete individual revisions with no problem.

When there is only one revision left - and I click to delete it - I get the following error messages:

This:

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /<path_to_drupal>/includes/database.mysql.inc on line 239.

And this:

warning: Cannot modify header information - headers already sent by (output started at /<path_to_drupal>/includes/common.inc:384) in /<path_to_drupal>/includes/common.inc on line 192.

If I go back to the previous page (using the web browser controls) - and then reload/refresh that page (the revisions page for the node) - then everything seems to work okay - and the last existing revision is deleted.

But - I think I probably shouldn't be seeing those error messages and using the workaround I've described above.

So, have I found some sort of bug in node.module (in or around function node_revision_delete - it might even be coming from the node_save call... dunno - Drupal's code is new to me - so I may be missing some information here...) - or is this just happening to me?

How do I go about confirming whether or not this is a bug - and how to I go about attacking the bug - if it is one?

Thanks!

(Also previously posted at: http://drupal.org/node/49959 - since I'm new here and trying to figure out where I should be asking questions like this...)

Comments

keesje’s picture

I'm having exactly the same problem at my site: www.qrios.nl.

Is there a solution, or should I move to Drupal 4.7?

Webbased applicaties, content management systemen, websites, webdesign

faenor’s picture

I did some basic bug hunting and so far (haven't looked much more closely since posting here earlier) - and I narrowed down where in the code I think the error messages are being generated - but I'm also pretty sure I haven't penentrated at least one or two more levels of indirection (i.e., global functions being used by the invocations I narrowed things down to...) - so, I can say that I have not found a solution for myself at this point...

I'm really hoping that someone with a strong understanding of 4.6.5 finds this thread and would be willing to shed some light on things... since my understanding is that 4.7.x is still in beta...

I'm interested in something more stable than a beta version - though I'm sure when I get to looking over 4.7.x a bit more, that I'll probably like quite a bit of what I find...

faenor’s picture

Well, at least one other person encountered the same issue, so it is appearantly not just me...

Here is a link to a bug report on the issue: http://drupal.org/node/49959

Like I said before, the only way I've found around this problem is to use the web browser navigation ("go back") to return to the previous page, followed by refreshing/reloading that page...

I'm still thinking that I shouldn't be seeing these error messages to begin with...

EDIT:

This problem seems to also be present in 4.6.6...

lisa’s picture

Using Drupal 4.6.6 - I can confirm experiencing the exact same problem, just as you described.

I am also looking for a solution. DWW appears to have offered a patch but is waiting for someone to review it. See #3 at:
http://drupal.org/node/54889

Is there a way to turn off the "create new revision" option until a solution for this bug is found?

faenor’s picture

Well, I tried the patch on for size - and it looks like a fix from where I'm sitting... Thanks all!