Jump to content

Recommended Posts

Posted

Hello,

We've recently completed upgrades to the latest version and have found that a previously working integration is now failing through the REST API. The error logs show an SQL issue:

INSERT INTO `cms_database_revisions` ( `revision_member_id`, `revision_date`, `revision_database_id`, `revision_record_id`, `revision_data` ) VALUES ( 5268, 1712654770, 1, NULL, '{<DATA OMITTED>}' )
  
Column 'revision_record_id' cannot be null

Looking further we can see that code was introduced in 4.7.15 that now tries to save a revision when creating a new record in this core file: applications/cms/api/records.php

if ( $item::database()->revisions )
{
	$revision = new \IPS\cms\Records\Revisions;
	$revision->database_id = $item::$customDatabaseId;
	$revision->record_id   = $item->_id;

    // .... rest of file

It sounds similar to the reported issue here after a search of this forum: 

It would be great to know if there is a fix we can apply from a working case, or if this is a bug? Many thanks.

Posted

FWIW I didn't need to store revisions for my use case, so I turned that off and it will work as it should.  If you need revisions you'll have to wait for a fix or do something custom as @teraßyte mentioned.

  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...