Page 1 of 1

Error when cloning a record

Posted: Tue May 11, 2021 9:53 am
by oli
Hi,
when I try to clone a record following error occures:

Code: Select all

[0] : 
===USER==========
globeadmin
===PDO MESSAGE=== 
SQLSTATE[42000]: Syntax error or access violation: 1110 Column 'tagesplan_nulog' specified twice
===SQL=========== 
INSERT INTO tagesplan  (tagesplan_id, `tplan_typ`, `tplan_status`, `tplan_titel`, `tplan_einsatztag`, `tagesplan_nulog`, `tagesplan_nulog`)  VALUES ('609a364a2f258ba', 'Tagesplan', 'Aktiv', 'Schule (Freitag) - CLONE', '2021-06-18', '{\"added\":{\"user\":\"oli\",\"time\":1620662183},\"viewed\":{\"user\":\"oli\",\"time\":1620719171}}', '{\"added\":{\"user\":\"oli\",\"time\":1620719178}}');
===BACK TRACE====
C:\wamp64\www\bts-sandbox1\core\nudata.php - line 419 (nuRunQuery)
C:\wamp64\www\bts-sandbox1\core\nuapi.php - line 71 (nuUpdateDatabase)
Creating and saving a record works fine.

I added the field <TABLENAME>_nulog to see who changed and viewed the record.

BR, Oli

Re: Error when cloning a record

Posted: Wed May 12, 2021 6:46 am
by kev1n
Does the error occur if you use a Display Object for the nulog Column?

Re: Error when cloning a record

Posted: Wed May 12, 2021 12:25 pm
by oli
I used an INPUT field (Type: Text) to show it.

Re: Error when cloning a record

Posted: Wed May 12, 2021 1:06 pm
by kev1n
Yes, that's what I was assuming. Please try a Display Object.

Re: Error when cloning a record

Posted: Wed May 12, 2021 1:53 pm
by oli
Hi Kevin,
I created a DISPLAY object - now it works !!!
Thank you.

Re: Error when cloning a record

Posted: Fri May 14, 2021 9:14 pm
by kev1n
BTW, this has been fixed. Now you may also use an Input object for the nulog column.