WebsiteBaker Support (2.12.x) > Modules
OneForAll duplicate item bug
(1/1)
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...
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:
--- Code: ---.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', '.$image['active'].', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');
--- End code ---
replace with
--- Code: ---.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', \''.$image['active'].'\', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');
--- End code ---
Navigation
[0] Message Index
Go to full version