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.
I started getting this error when displaying views which include the field that's using the select_or_other input widget.
I traced into the code and figured out that it's not dealing gracefully with a set of Available Options where some of them DO and some of them DON'T include a | (for key|value). In my case, the last line was blank. The work-around is to either include a | in every line, or in none of the lines.
Comments
Comment #1
legolasboI am unable to reproduce this issue
Please provide detailed steps to reproduce it and reopen the issue if this is still a problem.
Comment #2
claudio.rossini@rarolab.it CreditAttribution: claudio.rossini@rarolab.it commentedI resolved deleting empty new lines into the "Available options" field
Comment #3
legolasboI haven't tried using an empty line in the options field. Setting to active so i won't forget to test this when I've got the time.
Comment #4
legolasboThis has been fixed in #2596057: Undefined offset: 1 in select_or_other_field_formatter_view()