Views uses non-existent "default" view mode, which causes Quick Edit to break

Created on 5 April 2016, over 8 years ago
Updated 17 July 2023, over 1 year ago

Problem/Motivation

When using a view that shows content and the content is rendered using the 'default' view-mode; when you click save it returns nothing.

1. Create a view (see config below)
a) Create block: true
b) Display format: Unformatted list of teasers
c) save and edit
d) Click on teaser in "Show:Content | Teaser"
e) Change View mode from teaser to default
f) Save

2. Add the view block to a theme region

3. Create a basic page

4. Use quick edit feature to edit on a node served form the view.

5. When you click save to whole field will disappear.

When I inspect the ajax response made to example.com/quickedit/form/node/NID/body/en/default?_wrapper_format=drupal_ajax I can see no data has been retuned

Response:
[{"command":"quickeditFieldFormSaved","data":"","other_view_modes":[]}]

I have attached a video demonstrating the issue.

Proposed resolution

I think the parameter $view_mode_id in QuickEditController->renderField should know how the handle the 'default' view-mode

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇳🇿New Zealand garethhallnz

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024