Create a new article.
Click Save
button.
Edit article.
Click Save
button.
Edit article.
Click Versions
button.
Click on a version.
Click Restore
button.
Column 'state' cannot be null
Labels |
Added:
?
|
Yes. However, when workflow is disabled, there is a different message.
Column 'ordering' cannot be null
there is a release blocker for versions and workflow
PHP 7.4.9
Please confirm your CANT restore the original version but your CAN restore subsequent versions
I can restore versions except for the last one listed.
The "last one listed" is "the first version created when you first create the article"... when the ordering is 0 in the db...
I confirm your assessment.
Title |
|
Ive debugged this but now Im in a loop and I cannot fight my way out, it seems that "ordering" on an Article being inserted to the db gets coverted from a 0 to NULL deep in the process for updating the assets tables.. in libraries/src/Table/Nested.php there is
$oldDispatcher = clone $this->getDispatcher();
$blankDispatcher = new Dispatcher;
$this->setDispatcher($blankDispatcher);
$result = parent::store($updateNulls);
// Restore previous callable dispatcher state:
$this->setDispatcher($oldDispatcher);
Before the store parent::store($updateNulls)
, the ordering is 0 and after the store its NULL, which is then passed the the versioning plugin using the onTableAfterStore event...
So the data being saved in the JSON. in the versions table is containing the nulls, so when you try to restore it you get the error messages.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-01 16:31:16 |
Closed_By | ⇒ | Quy |
Thanks!
is this with workflow enabled?