The CMS/ framework is on 4.7. Note the CWP dependency is NOT required to reproduce the issue (explanation below)
Description
When comparing two versions of a page, you get a stuck SilverStripe spinner, this is because the AJAX request has returned a 500 error and no valid data is returned.
Expected behaviour: the difference between two pages in history will display a diff version.
I installed a fresh version of SilverStripe to confirm. I could reproduce the issue.
The following error is returned:
ERROR [Emergency]: Uncaught InvalidArgumentException: $content parameter needs to be a string or array IN GET /admin/historyviewer/schema/compareForm/1?RecordVersionFrom=2&RecordVersionTo=4&RecordClass=Page&RecordID=1 Line 170 in C:\Wnmp\sites\playground\vendor\silverstripe\framework\src\View\Parsers\Diff.php Source ====== 161: }
The error is caused by a ManytoMany relationship being sent to the diff engine. We managed to "fix" it by returning an empty array instead of the exception inside the Diff.php file, but this is likely not an appropriate solution.
Steps to Reproduce
install fresh SilverStripe instance
install CWP (this is not requried - any manymany or manyone relationship is needed to break it. This is a module that adds Taxonomy to all page types which will break the diff view)
navigate to CMS, save a page so you have a version to compare
compare the page versions in the history tab. it will break.
Thanks for the report, @torleif! This issue has been fixed in silverstripe/silverstripe-versioned-admin#197, and will be included in the next patch release of Silverstripe CMS.
Affected Version
The CMS/ framework is on 4.7. Note the CWP dependency is NOT required to reproduce the issue (explanation below)
Description
When comparing two versions of a page, you get a stuck SilverStripe spinner, this is because the AJAX request has returned a 500 error and no valid data is returned.
Expected behaviour: the difference between two pages in history will display a diff version.
I installed a fresh version of SilverStripe to confirm. I could reproduce the issue.
The following error is returned:
The error is caused by a ManytoMany relationship being sent to the diff engine. We managed to "fix" it by returning an empty array instead of the exception inside the Diff.php file, but this is likely not an appropriate solution.
Steps to Reproduce
This issue appeared in 4.7.