OneForAll duplicate item bug

dbs

Hi, in short: we had a similar problem with image set to inactive. Do you remember?
Reason was a enum field in the database which expected a string instead of a number.

Solution.
One change at field active: \''.$image['active'].'\' in save_item.php line 681

original:.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', '.$image['active'].', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');

replace with.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', \''.$image['active'].'\', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

CodeALot

OneForAll version 2.0.2.23
WB version 2.12.2 r379
PHP 7.3.6

Let's say you have a record with 10 images.
6 images are marked "Active", 4 are "Inactive"

Duplicate the record

All 10 images are copied to the new /media/oneforall/images/itemID and /media/oneforall/thumbs/itemID folders.
>> The database, however, only has the 6 active images for the new record.

So when you try to correct this, and re-upload the missing 4, you will get the "already exists" error, because the files are there but the database doesn't know it...