Extension talk:Drafts/Archive 1

GPL ?
Sounds like an interesting extension! But what is its licence? I don't see anything in the source, and the extensions page says "GPL" without saying whether it's 1, 2, or 3, with or without later versions. NSK Nikolaos S. Karastathis 03:29, 28 October 2008 (UTC)
 * GPL v2. It's now defined in the code. --Trevor Parscal 18:29, 29 October 2008 (UTC)

Don't work with Extension:DeletePagePermanently and Extension:Proofread Page

Opt out?
What if this is installed on a wiki, and a user doesn't want their drafts automatically saved while they are editing and/or in show preview mode? Cirt 10:41, 18 January 2009 (UTC)
 * See 17064. --MZMcBride 01:33, 21 January 2009 (UTC)

Snapshot ?
Why is the snapshot page don't have the Drafts Extension ? --Phd0 11:33, 29 January 2009 (UTC)

Don't have an empty box
In some circumstances a [Drafts:_____________] empty box will appear. Jidanni 02:06, 2 April 2009 (UTC)

FCKEditor...
This extension, when the rich editor is enabled, does not paste in the changes as wikitext.

Also is there a possibility you could preserve line breaks? Even if this is pasted in with fckeditor the text will not be parsed properly for editing with the rich editor.

67.97.209.36 19:03, 24 July 2009 (UTC)

How private are drafts?
Are drafts only visible to the user who made the edit? More explicitly, if I have $wgGroupPermissions['*']['edit'] = false; then will non-logged-in users not ever be able to see drafts? Thanks. 20:03, 19 May 2010 (UTC)

One draft per-page per-user?
Just looking for a confirmation on this: It looks like there's a single draft per-page per-user, right? The "You have 1 draft for this page" confused me a bit, since I'm the only editing user on my mediawiki, but looking at the extension code seems to indicate that it's a single draft per page for a given user. Thanks! 21:09, 19 May 2010 (UTC)

Installation Guide
Saving drafts as conceived by your hard work an important prerequisite to avoid user annoyance in the case their editings are lost due to volatile server availability. Since a it employes own tables I would expect the installation to be supported a bit better. Suggestion: name the tables used in the documentation page or provide a quick SQL for creating those tables for MySQL. Thanks for your devotion! Wolfgang

Internal Error
Running the following specs

with Drafts (Version r46751), I get the following when I try to save a page with an existing draft: Detected bug in an extension! Hook DraftHooks::discard failed to return a value; should return true to continue hook processing or false to abort. Backtrace:
 * 0 C:\Inetpub\wwwroot\mediawiki\includes\Article.php(1779): wfRunHooks('ArticleSaveComp...', Array)
 * 1 C:\Inetpub\wwwroot\mediawiki\includes\Article.php(1472): Article->doEdit('__NEWSECTIONLIN...', 'drafts extensio...', 98)
 * 2 C:\Inetpub\wwwroot\mediawiki\includes\EditPage.php(1027): Article->updateArticle('__NEWSECTIONLIN...', 'drafts extensio...', false, false, false, '')
 * 3 C:\Inetpub\wwwroot\mediawiki\includes\EditPage.php(2483): EditPage->internalAttemptSave(false, false)
 * 4 C:\Inetpub\wwwroot\mediawiki\includes\EditPage.php(449): EditPage->attemptSave
 * 5 C:\Inetpub\wwwroot\mediawiki\includes\EditPage.php(340): EditPage->edit
 * 6 C:\Inetpub\wwwroot\mediawiki\includes\Wiki.php(510): EditPage->submit
 * 7 C:\Inetpub\wwwroot\mediawiki\includes\Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 8 C:\Inetpub\wwwroot\mediawiki\index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 1) 9 {main}

Note: Discarding by clicking on the discard link works fine. Any help? 202.167.15.162 10:22, 10 November 2010 (UTC)

MYSQL TABLE ERROR
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Drafts::num". Database returned error "1146: Table 'sunjayc_mwki1.wiki_drafts' doesn't exist (localhost)".

That is the error I got, and here are my specs:

Any Help? --199.126.247.197 20:20, 29 December 2010 (UTC)


 * You need to run the update script. —Emufarmers(T 00:19, 30 December 2010 (UTC)

Internet Explorer undo broken with Drafts
After debugging for a while, I found out Drafts extensions breaks Internet Explorer undo function because it updates the "Save Draft" button for each key press, so adding an if to update the button when the state is modified only fixes it.

Here is the patch to Drafts.js, of course the patch is big because of indentention changes, the only new line added is diff -udpr Drafts/Drafts.js Drafts.iefix/Drafts.js --- Drafts/Drafts.js    2009-10-15 12:02:14.000000000 -0400 +++ Drafts.iefix/Drafts.js     2011-03-12 19:22:12.000000000 -0500 @@ -27,30 +27,32 @@ function Draft { newState ) {               // Stores state information -               state = newState; -               // Updates UI elements -               switch ( state ) { -                       case 'unchanged': -                               form.wpDraftSave.disabled = true; -                               form.wpDraftSave.value = messages.saveDraft; -                               break; -                       case 'changed': -                               form.wpDraftSave.disabled = false; -                               form.wpDraftSave.value = messages.saveDraft; -                               break; -                       case 'saved': -                               form.wpDraftSave.disabled = true; -                               form.wpDraftSave.value = messages.saved; -                               break; -                       case 'saving': -                               form.wpDraftSave.disabled = true; -                              form.wpDraftSave.value = messages.saving; -                              break; -                      case 'error': -                              form.wpDraftSave.disabled = true; -                              form.wpDraftSave.value = messages.error; -                              break; -                      default: break; +              if (state != newState) { +                      state = newState; +                      // Updates UI elements +                      switch ( state ) { +                              case 'unchanged': +                                      form.wpDraftSave.disabled = true; +                                      form.wpDraftSave.value = messages.saveDraft; +                                      break; +                              case 'changed': +                                      form.wpDraftSave.disabled = false; +                                      form.wpDraftSave.value = messages.saveDraft; +                                      break; +                              case 'saved': +                                      form.wpDraftSave.disabled = true; +                                      form.wpDraftSave.value = messages.saved; +                                      break; +                              case 'saving': +                                      form.wpDraftSave.disabled = true; +                                      form.wpDraftSave.value = messages.saving; +                                      break; +                              case 'error': +                                      form.wpDraftSave.disabled = true; +                                      form.wpDraftSave.value = messages.error; +                                      break; +                              default: break; +                      }                }        } TiCPU 00:26, 13 March 2011 (UTC)