Jump to content

Featured Replies

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.

Solved by teraßyte

Go to solution

Known issue 

 

  • Solution

It's indeed the same issue.

I posted a fix here if you can't wait for IPS to fix it in the next (?) version:

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...

We have released a patch to address this issue. Please go to AdminCP > System > Support and apply the patch from the first/top left box. If you do not see an option to install the patch, you already have the latest release.

Recently Browsing 0

  • No registered users viewing this page.