Comma in the view label breaks display selection

Created on 3 October 2024, 6 months ago

When a view's label has commas in it - the viewsreference field can't recognize that view.

In order to reproduce, just rename a view to have a comma "," in it's label. Then try to select that view using autocomplete field widget.

It looks like the issue is with the js/viewsreference.js where the selected item is treated as a collection of terms, while this most likely is never a case for views selection.

So, for example, when your view is named Blocks, pages and other things you get ""Blocks, pages and other things (view_id)"" as result - with double quotes, which then breaks view lookup on the back end

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States euk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @euk
  • Pipeline finished with Success
    6 months ago
    Total: 222s
    #300290
  • Pipeline finished with Failed
    6 months ago
    Total: 438s
    #300320
  • Pipeline finished with Success
    6 months ago
    Total: 257s
    #300330
  • πŸ‡¬πŸ‡§United Kingdom scott_euser

    Thanks for flagging! Added one comment to the MR

    We also need tests, but there is something similar already for brackets which can be a good example:
    ViewsReferenceFieldTest::testViewWithBrackets() essentially but with now comma in the name instead

    Thanks!

  • Pipeline finished with Success
    6 months ago
    Total: 320s
    #313140
  • Pipeline finished with Canceled
    6 months ago
    Total: 76s
    #313143
  • Pipeline finished with Success
    6 months ago
    Total: 227s
    #313144
Production build 0.71.5 2024