Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#21 | node-log-2-D6.patch | 1.08 KB | desbeers |
#18 | 385602-log-message-lost-on-preview.patch | 2.74 KB | Damien Tournoud |
#17 | 385602-log-message-lost-on-preview.patch | 2.74 KB | Damien Tournoud |
#16 | node-log-3.patch | 1.09 KB | desbeers |
#14 | node-log-2.patch | 1.09 KB | desbeers |
Comments
Comment #1
tsvenson CreditAttribution: tsvenson commented+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...
Comment #2
jwuk CreditAttribution: jwuk commented+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! :)
Comment #3
Gábor HojtsyYeah, 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.
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commented@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.
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedFilling in the proper component.
Comment #8
hass CreditAttribution: hass commentedSubscribe
Comment #9
bryan kennedy CreditAttribution: bryan kennedy commentedSubscribing.
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:
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.
Comment #10
Gábor HojtsyThe 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.
Comment #11
gpk CreditAttribution: gpk commentedMarked #242690: "Log message" doesn't display on node preview page and #252630: Log message vanishes on preview as duplicates, and rewording title since this is a general bug in 6.x/7.x.
Other duplicates: #400926: Log message shouldn't be required for preview of doc page changes and #397824: Log message is lost on preview.
Comment #12
desbeers CreditAttribution: desbeers commentedI 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.
Comment #14
desbeers CreditAttribution: desbeers commented$node->log is not always set so trigger.module gave notices with previous patch. The test-bot is handy :-)
New patch attached.
Comment #16
desbeers CreditAttribution: desbeers commentedReroll because the vertical tabs patch is committed.
Comment #17
Damien Tournoud CreditAttribution: Damien Tournoud commentedNow with a test.
Comment #18
Damien Tournoud CreditAttribution: Damien Tournoud commentedOups, grammar fix.
Comment #19
swentel CreditAttribution: swentel commentedTested it on local machine, works as intented and test bot is happy, marking rtbc!
Comment #20
Dries CreditAttribution: Dries commentedLooks good! Thanks all -- committed to CVS HEAD. Lowering the version number for Gabor.
Comment #21
desbeers CreditAttribution: desbeers commentedAnd the D6 patch for Gabor.
Comment #22
Gábor HojtsyThanks, committed to Drupal 6 too. Should be deployed on Drupal.org in a few days hopefully.