Unable to save order view without javascript

Created on 26 October 2023, over 1 year ago
Updated 27 October 2023, over 1 year ago

Problem/Motivation

If you press the save button of a draggable views ordering page, the page reloads with an error instead of saving, because the weight field is empty, and null is not an allowed value in the database.

Steps to reproduce

Enable the DraggableViews Demo module.
Add a DraggableViews Content node.
Go to draggableviews-demo/order
Disable javascript in your browser
Observe the weight field is empty
Press save order
Observe the error ' There was an error while saving the data. Please, try again. ' instead of the expected success message.

Proposed resolution

Either the field handler needs to set a value instead of leaving it empty, or draggableviews_views_submit needs to handle null values and fix it there before inserting in to the db.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇬🇧United Kingdom nicrodgers Monmouthshire, UK

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024