-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: extensions/widgets/relationarea: ui/editorial-workflowtype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
When editing a page, having the i18n pane open enables the save button even if nothing has changed. If the user presses the save button (which they naturally do thinking they've unsaved content) before making any actual changes, an empty merge request is created, which crashes the editorial workflow screen with a 404 error.
To Reproduce
- Configure cms as below
- Edit a page with a relationship to another collection
- In a short moment, the state of the save button changes from 'saved' to 'unsaved content'
- Click the save button
- Empty merge request is posted (to gitlab backend)
Expected behavior
Save button should stay disabled until there is meaningful changes to save.
Applicable Versions
- Decap CMS version: 3.1.10
- Git provider: Gitlab
- OS: Ubuntu 22.04.4 LTS
- Browser version: Firefox 123.0.1, Chrome 122.0.6261.94
CMS configuration
Slightly redacted for brewity and security.
backend:
name: gitlab
auth_type: pkce
auth_endpoint: oauth/authorize
branch: master
commit_messages:
create: "Create {{path}} by {{author-login}}"
update: "Update {{path}} by {{author-login}}"
delete: "Delete {{path}} by {{author-login}}"
uploadMedia: "Upload {{path}} by {{author-login}}"
deleteMedia: "Delete {{path}} by {{author-login}}"
i18n:
structure: multiple_files
locales: [ sv, en ]
defaultLocale: sv
collections:
- name: 'staff'
folder: content/staff
media_folder: '/{{media_folder}}'
public_folder: ''
i18n: true
create: true
delete: true
fields:
- label: 'Name'
name: 'title'
widget: 'string'
i18n: 'duplicate'
required: true
- label: 'Presentation'
name: 'body'
widget: 'markdown'
i18n: true
required: false
- name: 'organisation'
folder: 'content/organisation'
media_folder: '/{{media_folder}}'
public_folder: ''
i18n: true
create: true
delete: true
summary: "{{dirname}}{{dirname | ternary('/','')}}{{slug}}"
path: "{{dirname | ternary('/','')}}{{dirname}}{{dirname | ternary('/','')}}{{slug}}"
fields:
- label: 'Title'
name: 'title'
widget: 'string'
i18n: true
- label: 'Content'
name: 'body'
widget: 'markdown'
required: false
i18n: true
- label: 'Author'
name: 'author'
widget: 'relation'
collection: 'staff'
# The bug is reproducible for all allowed values i18n
i18n: 'duplicate'
value_field: 'title'
multiple: false
required: true
Metadata
Metadata
Assignees
Labels
area: extensions/widgets/relationarea: ui/editorial-workflowtype: bugcode to address defects in shipped codecode to address defects in shipped code