- Issue created by @Anybody
- First commit to issue fork.
- Assigned to supriyak
- 🇮🇳India supriyak
Hi @Anybody,
"enabled" key is already present in watchdog_mailer.settings for another field. It is affecting to changing key for 'watchdog_mailer_enable'.
Please suggest on this.Thanks!
- Issue was unassigned.
- 🇩🇪Germany Anybody Porta Westfalica
Yes it's already used for the sublevel but should also be used for the top level. Only a complete implementation including correct update hook will be credited.
- 🇮🇳India supriyak
Thank you @Anybody for reply.
Can you please check 'WatchdogMailerSettingsTest.php'? In this file there are no levels and sublevels, here they maintain sequence only.
So it will be confusing here. Please suggest on this.I have done with my code just waiting for your reply on this.
Thanks!!
- Merge request !23Resolve #3457081 "Rename watchdogmailerenable config" → (Merged) created by supriyak
- Status changed to Needs review
7 months ago 11:47am 27 June 2024 - 🇮🇳India supriyak
Hi @Anybody,
Please review my changes and let me know your valuable feedback on this.
MR - https://git.drupalcode.org/project/watchdog_mailer/-/merge_requests/23
Commit - https://git.drupalcode.org/project/watchdog_mailer/-/merge_requests/23/d...Thank you!
- Status changed to Needs work
7 months ago 7:49am 16 July 2024 - 🇩🇪Germany Anybody Porta Westfalica
Just a last grammatical issue, then this LGTM. @LRwebks can you please fix that and test if it works as expected?
- 🇩🇪Germany lrwebks Porta Westfalica
Okay, I noticed that a few instances of
watchdog_mailer_enable
were still left in the project and then noticed the problem with the rename:
As far as I can see this change might actually interfere with theenabled
value from the Notification Object, e.g.->set('enabled', $form_state->getValue('enabled'))
appears twice and as such the submit would not work correctly.
I think we have two options here now: Revert this change or rename the Notification Object key to something likenotification_object_enabled
.
@Anybody, @supriyak: What do you think of this? - 🇩🇪Germany Anybody Porta Westfalica
Nice! Technically, they can't interfere, but good finding, the author just missed these other locations! :)
Please also test the update hook using
cex
before and after! - 🇩🇪Germany lrwebks Porta Westfalica
Unfortunately, after a bit of testing it is clear that the keys do conflict with saving and dynamic visibility. If one
enabled</code checkbox is enabled, then both will be saved as enabled. Similarly, the form is only hidden if BOTH checkboxed are turned off, if the <code>watchdog_mailer_enable
is off and the Notification Object is still on, the Form is still visible...
How do we solve this now? - Status changed to Needs review
7 months ago 9:53am 16 July 2024 - 🇩🇪Germany lrwebks Porta Westfalica
Well, now, after a lot of tweaking related to the fact that the different keys were unintentionally pulled to the same level within the form and were now conflicting - everything should be working now! Tests are green locally as well.
- Status changed to RTBC
7 months ago 10:19am 16 July 2024 - 🇩🇪Germany Anybody Porta Westfalica
Great work! RTBC! :) And a further step into multiple notifications configurations direction :)
-
Anybody →
committed 3f5ca954 on 3.x authored by
supriyak →
Issue #3457081 by supriyak, LRWebks, Anybody: Rename "...
-
Anybody →
committed 3f5ca954 on 3.x authored by
supriyak →
- Status changed to Fixed
7 months ago 12:59pm 16 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.