backdrop-contrib / diff

Show differences between content revisions.
GNU General Public License v2.0
0 stars 5 forks source link

Regression: Default diff state mode not respected. #16

Open klonos opened 3 years ago

klonos commented 3 years ago

Testing Diff 7.x-3.3 in a D7.82 sandbox

  1. When I compared revisions, I got the "HTML" (raw) mode shown out of the box: image The path I was at was node/1/revisions/view/1/2.
  2. I switched to "Marked down" mode, which took me to node/1/revisions/view/1/2/raw-plain
  3. I switched back to "Standard" mode, which took me to node/1/revisions/view/1/2 (notice: no /raw added to the end of the path)
  4. I then navigated to admin/config/content/diff/entities and switched the "Diff default state" setting to "- None -" (which I find of no use at all by the way), and saved settings.
  5. When I compared revisions again, I got this: image

Testing Diff 3.4.0 in a Backdrop 1.20.0 demo sandbox

  1. I navigated to admin/config/content/diff/entities and confirmed that the "Diff default state" setting was set to "HTML view" (raw) out of the box.
  2. When I compared revisions, I got this (which is basically the "- None -" diff mode 👎🏼 ): image The path I was at was node/1/revisions/view/1/2.
  3. I switched to "Marked down" mode, which took me to node/1/revisions/view/1/2/raw-plain 👍🏼
  4. I switched back to "Standard" mode, which took me to node/1/revisions/view/1/2/raw (differs compared to the 7.x behavior, which is that no /raw is being added to the end of the path)
  5. I navigated to admin/config/content/diff/entities and changed the "Diff default state" setting to "Plain view" (raw-plain).
  6. When I compared revisions, I got the "- None -" diff mode again 👎🏼
quicksketch commented 2 years ago

This project doesn't have the same labels as core, but this should/could be marked RTBC. I reviewed and tested and I'm using this PR on my projects successfully. :+1:

izmeez commented 9 months ago

I'm wondering if this issue has been lost. Last note by @quicksketch suggests the PR #21 could be RTBC and looking at the diff the significant fix seems to be these lines:

-  $default_state = config_get('diff.settings','diff_default_state_node');
+  $default_state = config_get('diff.settings', 'diff_default_state.node');