You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A provisional draft created via GraphQL API is not visible in control panel UI when original entry has no author assigned.
Steps to reproduce
Create an entry without assigning an author. On of the ways to achieve that is a Feed Me import.
Create a provisional draft for this entry using the createDraft GraphQL mutation.
Optionally modify the draft via GraphQL API, e.g. change title.
Open edit form for that entry in Control Panel
Expected behavior
Control Panel should show that there is a provisional draft, i.e. there should be this "unsaved changes" bar:
If that provisional draft contains some changes, they should be reflected in the edit form.
Actual behavior
Control panel does not show that bar. Changes from the draft are not present in the form. Change made to the edit form causes creation of one more provisional draft.
Craft CMS version
4.4.11
PHP version
8.0.22
Operating system and version
Debian GNU/Linux 11
Database type and version
PostgreSQL 13.6
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-35)
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
It’s happening because, for drafts created via GraphQL, the creator is derived from the entry’s author. When the entry doesn’t have one, the draft creator will also be empty. A provisional draft will only show in the control panel for its creator, so if the creator is null, the provisional draft exists in the database but won’t be pulled in and shown to anyone.
I’ve added the creatorId argument to the createDraft mutation to mitigate this.
What happened?
Description
A provisional draft created via GraphQL API is not visible in control panel UI when original entry has no author assigned.
Steps to reproduce
createDraft
GraphQL mutation.Expected behavior
Control Panel should show that there is a provisional draft, i.e. there should be this "unsaved changes" bar:
If that provisional draft contains some changes, they should be reflected in the edit form.
Actual behavior
Control panel does not show that bar. Changes from the draft are not present in the form. Change made to the edit form causes creation of one more provisional draft.
Craft CMS version
4.4.11
PHP version
8.0.22
Operating system and version
Debian GNU/Linux 11
Database type and version
PostgreSQL 13.6
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.0-35)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: