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.
Field UI has been added as a dependency in #2848213: Give warning when wrong datetime field widget is set.
The only reason it's needed is to print out a message when a wrong widget type is chosen and link to the form display page.
I get that field_ui is needed to configure scheduler but I prefer to disable UI modules on production environments.
Comment | File | Size | Author |
---|---|---|---|
#2 | remove_field_ui-2884680-2.patch | 1.07 KB | geertvd |
|
Comments
Comment #2
geertvd CreditAttribution: geertvd at Geert van Dort commentedCore uses this approach in hook_help a lot for these situations.
Comment #3
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi geertvd,
This is interesting, thanks for the info and patch. Yes I added the dependency thinking that it was going to be required anyway to allow admins access to the Scheduler fields. But you are right that it can be turned off once the fields are configured.
Is there a good way to suggest to admins that they might find it useful to enable field_ui for setting up a site but the module does not require it? Maybe a line of text in the Scheduler config page would help, or in the readme?
I'll do some manual testing with your patch and see how it goes.
Jonathan
Comment #4
geertvd CreditAttribution: geertvd at Geert van Dort commentedThat honestly seems unnecessary to me, UI modules are enabled in the standard install profile.
If a user would start a new installation from minimal profile I think we can assume that this is an advanced user, same can be said about someone uninstalling UI modules.
Comment #5
daften CreditAttribution: daften at District09 commentedTo give my 2 cents, requiring a UI module is simply not done. If you want to indicate to a user that he'd need the field_ui module for some functionality, using hook_requirements with install phase should be enough.
I'd also say this is a bug and not a feature request. This patch doesn't add any features, but reverts unwanted behaviour (for most use cases).
Comment #6
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedOK I take the point
Ha ha, yes you are right. I've switched it back, and will get this committed soon.
Comment #8
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedFor reference, aggregator_help() and comment_help() have this, and I'm sure many others do too.
I added a "not available" text into the message string to explain why the link does not work.
Thank you. Committed and Fixed.