growing fast if by default saves every 30 secs per opened draft!
once nodes are saved drafts aren't deleted from DB (also tried running cron to check out)
nothing gets deleted from DB
the site's backups will become unmanageable shortly, so this is critical

Comments

darren.ferguson’s picture

Drafts are removed from the database when the draft is actually created as a node. The saving of draft will provide the same draft id in the same draft. It will not continually update the draft id and provide a new one every time the draft is saved.

If it does this then you probably have the devel module issue that was http://drupal.org/node/319669 which has been resolved in the latest HEAD code for the module.

darren.ferguson’s picture

Status: Active » Closed (fixed)

Re-open if the problem persists.

arhak’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

reopened, since no devel installed
clean D6.5, draft, node saved, many draft used, some saved as node, some not saved, all ids are intact in DB.
BTW: no views installed since it wasn't a requirement at the time.
I was just testing around the following:

  1. letting many drafts to be generated without saving the existing node
  2. oppening (with the same user) the node again for edition without taking draft into account to see if draft was autoloaded (make sense when views was not required)
  3. saving the node many times
  4. drafts remain on DB
  5. then do it as expected
  6. new node save as draft
  7. wait for DB to get some drafts
  8. save the node
  9. drafts remain on DB

Might this be a missing views issue?
I'm not sure but think I also test with existing node, then drafts, then save, then nothing change on DB

darren.ferguson’s picture

Yes the views are needed so you can see the draft list. If you create a draft then go away and come back it will create a new draft unless you have used the views for the D6 module since if the draft id is not passed in the URL then you will not get the draft view and hence if no draft id is present the draft id will be continually created.

arhak’s picture

fine
but what about saving draft then saving the node without leaving the page
the draft remain on DB the same

Lets keep this as needs more info, since I have to test it again but not right away.
I will then install views (just was curious about the dependencies and didn't installed on the first test) and probably the last dev

Also if you think this issue doesn't stand, you may close it right now

darren.ferguson’s picture

I wont close right now, but when the save occurs in the nodeapi the draft id is part of the node since it is passed into the form values for node save and hence should be there.

When it is there the draft should be removed from the database at this point.

darren.ferguson’s picture

Based on the module i have just checked in head here is what i get, i cannot re-produce this issue on any browser i have at hand.

1. Clean database no drafts in it whatsoever.
2. Create new blog (i have blogs as allowed to save as draft in the content type configuration).
3. Type in information and hit the save as draft. (receive 1 as my draft id)
4. Type in more information and hit save as draft (receive 1 again as my draft id)
5. Check database it only has one row and it is the draft id of 1.
6. Save the Node
7. Node is saved and the draft id is there in nodeapi and deletes the draft
8. Check the database and no draft exists in the system.

darren.ferguson’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

You were correct, the issue did exist on new drafts and the id was being returned but it was not being put into the correct form element by jquery by the looks of it. Have implemented where if the draft id does not get passed the system will increment the counter and put it in the hidden field from the begining. This has been rolled into HEAD.