If I edit a handbook page and preview it, I get a form error about the missing log message.
This in itself is a bit of a pain, as you often preview something before you've decided on exactly what the changes are going to be.

But then you add a log message, preview it, and the message is gone anyway!

Solution: either don't gripe about it when previewing (best), or keep it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tsvenson’s picture

+1

I discovered the same thing as I just published my first handbook page.

After the second time I just entered one character in there and then wrote the real log when I was ready to save it. None of my nonsense characters was viewing in the revision log so I assume ther are not save and this is a workaround.

Preferable though is that it is only checked when I actually hit the save button. There is otherwise a chance that I, out of habit, wont put in the right log msg when hitting save...

jwuk’s picture

+1 from me too. I was about to report this as an issue but searched first. I'd amended a handbook page, filled in the log message, hit preview, was happy, hit save and got the complaint about missing field WHICH I HAD PREVIOUSLY FILLED IN. I know I shouldn't react this way, but it feels like I did the community thing of helping improve documentation and then got smacked in the face with a wet fish! :)

But thanks for a great community anyhow! :)

Gábor Hojtsy’s picture

Project: Drupal.org infrastructure » Drupal core
Version: » 7.x-dev
Component: Drupal.org module » base system
Status: Active » Needs review
FileSize
692 bytes

Yeah, fully agreed on the badness of the issue. I looked into it, and it turns out this is a Drupal core bug. If you look at node_form(), it is visibly not using the $node->log information to fill in the default for this field.

Let's get this simple fix tested and committed to Drupal 7, then 6 and deploy on drupal.org to solve it. Anyone can help test the issue, so we can quickly move along. Here is a quick patch.

Status: Needs review » Needs work

The last submitted patch failed testing.

Damien Tournoud’s picture

Status: Needs work » Needs review
FileSize
1.02 KB

@Gabor: that change will probably make the old log message appear in the field, which is clearly not what we want.

Let's try this one instead.

Damien Tournoud’s picture

Component: base system » node.module

Filling in the proper component.

Status: Needs review » Needs work

The last submitted patch failed testing.

hass’s picture

Subscribe

bryan kennedy’s picture

Subscribing.

Is there any path by which I could contribute a patch for d6 that would be considered for this problem? It makes editing the d.o handbooks a big pain. If we don't fix the problem til d7 we'll be dealing with this odd workflow for most handbook page edits:

  1. Edit node
  2. make edits
  3. Type a log message into the field b/c it is required
  4. Copy it in on your local computer b/c you know it will go away when you preview
  5. Preview your edits
  6. Paste your log message back into the log field
  7. Save changes

I know this is about d7, I'm just wondering if it's possible to get this fixed on d.o before d7's implementation.

Gábor Hojtsy’s picture

The idea is that if this is a real problem, it should not be hard to persuade webchick to commit it, once there is a patch which passes testing. The standard workflow for any Drupal bugfix again is that it is fixed in the current development version first and then backported to ensure that the next Drupal version does not introduce regressions.

gpk’s picture

Title: handbook pages gripe about log on preview but don't save it! » Log message is lost on node preview
desbeers’s picture

Status: Needs work » Needs review
FileSize
1.06 KB

I clear the old $node->log in node_object_prepare() and add $node->log as '#default_value' to node_form() and now preview is working for me.

Status: Needs review » Needs work

The last submitted patch failed testing.

desbeers’s picture

Status: Needs work » Needs review
FileSize
1.09 KB

$node->log is not always set so trigger.module gave notices with previous patch. The test-bot is handy :-)

New patch attached.

Status: Needs review » Needs work

The last submitted patch failed testing.

desbeers’s picture

Status: Needs work » Needs review
FileSize
1.09 KB

Reroll because the vertical tabs patch is committed.

Damien Tournoud’s picture

Now with a test.

Damien Tournoud’s picture

Oups, grammar fix.

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Tested it on local machine, works as intented and test bot is happy, marking rtbc!

Dries’s picture

Version: 7.x-dev » 6.x-dev

Looks good! Thanks all -- committed to CVS HEAD. Lowering the version number for Gabor.

desbeers’s picture

FileSize
1.08 KB

And the D6 patch for Gabor.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to Drupal 6 too. Should be deployed on Drupal.org in a few days hopefully.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.