Active
Project:
Drupal core
Version:
main
Component:
entity system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2008 at 18:11 UTC
Updated:
26 Jul 2024 at 05:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
deviantintegral commentedBah, made the patch against the node folder instead of the drupal root.
Comment #3
add1sun commentedLooks good to me. I haven't had a chance to test it yet. My only nit-picky thing (since this is core) is that comments should end in a period.
Comment #4
oadaeh commentedYour second patch adds a line with nothing more than two spaces.
I'm also attempting to review it more in depth, but I'm currently trying to get past http://drupal.org/node/299661.
Everything looks fine, but I want to verify one validity check.
Comment #5
oadaeh commentedOkay, as I suspected, there are not enough validation checks being done. Here are the things I found wrong with the proposed patch:
Comment #6
webchickAlso, not to sound like a broken record or anything, but we'll need tests for this. There's a lot of tweaky logic, as evidenced by oadaeh's #5. In fact, this might be a great case where "test-driven development" (writing tests that document the logic first, then filling in code so they pass) could shine.
Comment #7
jbrauer commentedhttp://drupal.org/node/120207 marked as a duplicate... though it was the predecessor since the patches/work is here keeping this one.
Comment #8
aren cambre commentedsubscribing as author of predecessor request
Comment #9
deviantintegral commentedSo I traced this down. The problem is that node_validate is being called by the edit form when you hit the delete button, validating all of the filled in form elements. Since any changes will be lost when you click the delete button, can't validation just be removed for that case? Or am I missing something more complex?
This brings up a more interesting case. I suppose it's possible to want to force log messages without revisions. If that's a valid case, then I guess the 'Revisions' tab could be changed to a 'Log messages' tab when revisions are disabled. Otherwise, the workflow form can be changed so that the option is only available if revisions are enabled.
As for doing tests, I totally agree, but unfortunately I'm rather new at testing in general. I'll take this as an opportunity to learn and see what I can come up with :).
--Andrew
Comment #10
webchick@deviantintegral: Awesome! Don't hesitate to stop by #drupal and ask testing questions if you get stuck. There are lots and lots of people who would love to help you out. :)
Comment #11
Susurrus commented#265259: Node form is validated before deletion should probably be resolved before this then.
Comment #12
oadaeh commentedAFAIK, there is no way to view the saved log message if revisions are disabled. Saving them is fine, but kind of pointless w/o a UI.
Comment #13
aren cambre commentedPatch is so old at this point that work here certainly needs a reset.
Comment #14
webchickNew features go into 8.x.
Comment #15
colanUntil somebody adds this to core, there's Enforce revision log message in contrib.
Comment #21
matsbla commentedI created this issue #2978701: Replace the revision log message with a comment field. I'm not sure if this is a solution for this issue, but if revision log messages were a comment field we could at least decide which comment fields are mandatory (and by that if a message is requiered or not).
Comment #23
dpiRevisions no longer bound to node
Comment #24
brayfe commentedThanks for the lead in #15. Was hoping I could do this with a core feature, without writing custom code, but I'll take a contrib module. Hope to see this in core in the future!
Comment #25
heddnThe extent of a "custom module" that is needed is:
Comment #26
hchonovYou don't need to hard code the name of the field as of https://www.drupal.org/node/2831499 .
Providing a configurable core feature for that however would require a more general solution. We would need to provide configurable options for all base fields of all entity types.
I just found this module - https://www.drupal.org/project/base_field_override_ui
I don't know if it exposes the revision log field, but as this allows overrides on bundle level I think this is the way to go. If this should be a core feature I would consider this module for inclusion in core or implementing something similar.
Comment #27
heddnActually in my testing, I had to hard code because calling getRevisionMetadataKey results in a circular endless loop. Which makes sense. But using those names is also how I stumbled on how core does it too in at least one place. So it seems that, at least for core provided revision log fields, we have all our base (fields) covered. Pun intended.
Good find in https://www.drupal.org/project/base_field_override_ui. If I didn't have a bunch of places to change this, that might make more sense.
Comment #32
crutch commentedUltimately we would like to have this. example
Comment #33
crutch commentedComment #38
bhanu951 commentedComment #39
bhanu951 commented