MYSQL query error when adding new record to related entity

Post Reply
aagency
Posts: 31
Joined: 22 May 2020, 11:31
Name: Massimiliano Losego
Location: Italy
Company Name: Atman Agenzia Digitale
Contact:

MYSQL query error when adding new record to related entity

Post by aagency »

Hi

I need to link 2 separate entities.
I need a one-to-many connection.

I've setup the two entities.
Then I add an "entity" field with dropdown and multiselect.

If I link existing entities there is no problem, and I also can add new record.
If instead I need to create a new record when no other record is connected I got a Mysql error showing
mysql_error.jpg
Here you can see a short video where I replicate the issue

https://www.loom.com/share/efb76f01a69f ... b1e6a4de09
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: MYSQL query error when adding new record to related entity

Post by p.dimitrov »

Same issue happening to me in 3.4.2 . It happens only with multiselect dropdown. I suspect it has something to do with the new 'edit record' functionality. Any solution to this?
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: MYSQL query error when adding new record to related entity

Post by support »

File from archive replace to includes\classes\fieldstypes\
Let me know if it works ok now.
Attachments
fieldtype_entity.zip
(4.04 KiB) Downloaded 22 times
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: MYSQL query error when adding new record to related entity

Post by p.dimitrov »

Thanks, it is fixed. Similar thing is happening for entity-drop down list(ajax). If new record is added with the plus icon, it is not automatically selected in list after creation, you must select it manually from the list.
Post Reply