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!

Comments

faenor’s picture

Title: Error when deleting last existing revision of a node » not just me

It seems that at least one other person encountered the same issue...

Here is a link to a forum topic on the issue: http://drupal.org/node/50018

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...

faenor’s picture

Title: not just me » delete revision problem

oops! (correcting the title)

magico’s picture

Version: 4.6.5 » 4.6.9
magico’s picture

Status: Active » Closed (duplicate)