Right now the code assume that the "Options" module is enabled, which is obviously not always the case.
As this module is a requirement, we should add it as a dependency in the .info file.
Without it, it's possible to enable Language Field without Options enabled, resulting in a poor UX when try to add a field (two widgets named "null" in the UI).

Comments

garphy’s picture

Status: Active » Needs review
StatusFileSize
new277 bytes

Patch attached.

  • johnv committed 4cb2408 on 7.x-1.x
    Issue #2270891 by garphy, johnv: Added dependency on Options module
    

  • johnv committed 4bfd0fc on 8.x-1.x
    Issue #2270891: Changed dependency on Options module
    
johnv’s picture

Status: Needs review » Fixed

The dependency is added in D7. Also, the hook_alter is better now.
For D8, no dependency is added, since our own Select list widget is provided (removing the possibility of radiobuttons). The onw widget provides a formatting options for the languages.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.