smallrecords icon indicating copy to clipboard operation
smallrecords copied to clipboard

October 2.0 - Error creating a record for the first time (create_onSave)

Open Alldar opened this issue 3 years ago • 1 comments

When creating a record for the first time, an error appears:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "create" (SQL: select * from "janvince_smallrecords_areas" where "janvince_smallrecords_areas"."id" = create limit 1)

Small fix for this: https://github.com/jan-vince/smallrecords/blob/ca43d75a4e155576446c6e6a43f79032db44d87a/controllers/Records.php#L53 Replaced by

$test = parent::create_onSave($areaId, $context);

The issuе is reproducible only in October 2.0, in October 1.0 / Wintercms everything is fine

Alldar avatar Aug 01 '21 12:08 Alldar

Hi @Alldar, i can't reproduce it :(

I am on October 2.0.29 and I have tested with SQLite and MySQL.

What is your environment? (OS, PHP version, web server, ...)?

Jan

jan-vince avatar Aug 03 '21 08:08 jan-vince