WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • OneForAll duplicate item bug
  • Print
Pages: [1]   Go Down

Author Topic: OneForAll duplicate item bug  (Read 11186 times)

Offline CodeALot

  • Posts: 603
  • Gender: Male
OneForAll duplicate item bug
« on: November 13, 2019, 02:53:36 PM »
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...
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8930
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: OneForAll duplicate item bug
« Reply #1 on: November 13, 2019, 04:09:23 PM »
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: [Select]
.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', '.$image['active'].', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');
replace with
Code: [Select]
.'VALUES ('.(int)$item_id.', \''.$image['filename'].'\', \''.$image['active'].'\', '.$image['position'].', \''.$image['alt'].'\', \''.$image['title'].'\', \''.$image['caption'].'\')');
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • OneForAll duplicate item bug
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2