Closed green17 closed 1 year ago
Duplicate of https://github.com/verbb/workflow/issues/168, can you try 2.0.2?
Hi @engram-design I upgraded to 2.0.2 but then some entries in the workflow give this error - just viewing them:
Diff\Differ\MapDiffer::doDiff(): Argument #1 ($oldValues) must be of type array, null given, called in /vendor/verbb/workflow/src/services/Content.php on line 39
Also the link to the entry is missing now on the right hand menu in /admin/workflow/submissions/edit/XXXXX
The error should be fixed for the next release. To get the fix early, change your verbb/workflow
requirement in composer.json
to:
"require": {
"verbb/workflow": "dev-craft-4 as 2.0.2,
"...": "..."
}
Then run composer update
.
As for the missing entry in the sidebar, what state is your submission? Pending, in review or approved? If you look up the ID of the submission (the XXXXX
part) in your workflow_submissions
database table, is there a value for ownerId
?
Once scenario where this might happen is that you've created a submission on an already-published entry (creating a new draft), and if approved, the draft will be deleted, but applying (overwriting) the original entry. But even in that instance, it should refer back to the canonical entry, instead of the now-deleted draft.
Yes there is an ID in ownerId in the DB, the id if looked up in entires works fine too. On the staging site it works for the 2.0.1 plugin version, we have a copy of the staging site DB for the local dev and it does not show on any of these pages - /admin/workflow or /admin17/workflow/submissions/edit/XXXXX.
If I do a new submission for review on an entry that is completely new it still does not work?
Strange! I've done a whole lot of submissions in multiple scenarios, checking each step along the way, and there's always a reference to the entry.
It should fetch the last review's draft. If you can look at the workflow_review
database table, for the submissionId
column to match the submission you are referring to, there should be both an elementId
and a draftId
.
Regardless, I've added support for things to fallback on the owner, when a draft doesn't exist, which should help. Run composer update
again to get this fix.
The fallback fixes it thanks. :-)
When I looked up a few some have no elementId or draftId, some have no draft id but have a elementId then some have both. If I look up one submissionId that has an edit/review/publish the edit/publish is blank for elementId or draftId and then the review had a elementId but no draftId.
Fixed in 2.0.3
Describe the bug
Status not saving after change and save - new entry edit screen in workflow /admin/workflow/submissions/edit/XXXXX
Steps to reproduce
Craft CMS version
4.2.5.1
Plugin version
2.0.1
Multi-site?
No
Additional context
No response