Entity dropdown ajax copy issue

Post Reply
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Entity dropdown ajax copy issue

Post by p.dimitrov »

Hi, I have a strange issue where the same copy value fields list don't work if its ordered in a specific way:
Here the query returns breaks and doesnt copy any of the fields:
not working.jpg
Here the same list but the last 4 fields moved to the top and everything works:
copy_ok.jpg
So if I had to add some field, it suddenly breaks everything until I guess the "correct" order in which it works again.
Is there some way in which fields should be arranged that is not described in the docs?

EDIT: Turns out it still doesn't work for all except one entity, which when selected copies values like it should, everything else doesn't copy anything. Absolutelly weird.
EDIT2: Finally found a working order:
copy_ok 2.jpg
Added field types of each field if that's of any relevance
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Entity dropdown ajax copy issue

Post by support »

Wait for 2.9. This source was updated and it should works better.
p.dimitrov
Posts: 166
Joined: 12 Jul 2017, 09:35
Name: Pavel
Location: Varna

Re: Entity dropdown ajax copy issue

Post by p.dimitrov »

Thanks!
jhisaza
Posts: 3
Joined: 28 Jan 2021, 20:37
Name: José Isaza
Location: Colombia-Cali

Re: Entity dropdown ajax copy issue

Post by jhisaza »

I got a similar issue:
Database Error: 1054 - Unknown column 'Argelia' in 'where clause'
Query: select e.* from app_entity_55 e where id in (Argelia)
Page: /calidad/index.php?module=dashboard/select2_json&action=copy_values&form_type=items/form&entity_id=55&field_id=63

I solvet it by changing this:
/modules/dashboard/actions/select2_json.php
line: 187
$copy_values = []; $copy_values = '[]';
sultan
Posts: 18
Joined: 15 Jul 2019, 09:44
Name: Mohamed Sultan
Location: kuwite
Company Name: sysleaders
Contact:

Re: Entity dropdown ajax copy issue

Post by sultan »

same copy list value dose not work
bdegroot22
Posts: 35
Joined: 24 Jun 2018, 13:03
Name: Bas de Groot
Location: Netherlands

Re: Entity dropdown ajax copy issue

Post by bdegroot22 »

Hello,

After installing a completely new 3.3.1 version with extension, I ran into a problem that looks very similar as an earlier reported "copy value" issue.

Database Error: 1054 - Unknown column 'EFFE' in 'where clause'
Query: select e.* from app_entity_35 e where id in (EFFE)
Page: /r3.3/index.php?module=dashboard/select2_json&action=copy_values&form_type=items/form&entity_id=35&field_id=283&token=M2At0HH2P5
#0 includes/functions/database.php(87): mysqli_query(Object(mysqli), 'select e.* fro...')
#1 modules/dashboard/actions/select2_json.php(327): db_query('select e.* fro...', false)
#2 index.php(20): require('/var/www/vhosts...')
#3 {main}
Image

Suggestion for a fix please?

Thanks and regards,

Bas
Attachments
copy_issue.png
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Entity dropdown ajax copy issue

Post by support »

File from archive replace to modules\dashboard\actions\

But note fields 281 and 283 should have the same type (Entity) and the same Entity configured.
If they have different entity then copy function will not work because it copy ID only, not Name.
Attachments
select2_json.zip
(3.54 KiB) Downloaded 102 times
bdegroot22
Posts: 35
Joined: 24 Jun 2018, 13:03
Name: Bas de Groot
Location: Netherlands

[SOLVED] Re: Entity dropdown ajax copy issue

Post by bdegroot22 »

Hello Sergey,

Sorry for the very late response. I checked the setup with another, working, implementation and found no difference. After this check I replaced the PHP script with the one that you posted in your reply. Now everything works ok again.

Thanks for the support.

Regards, Bas
Post Reply