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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • OFA - Duplicate Item / Issue in MySQL-Strict Mode
  • Print
Pages: [1]   Go Down

Author Topic: OFA - Duplicate Item / Issue in MySQL-Strict Mode  (Read 6033 times)

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
OFA - Duplicate Item / Issue in MySQL-Strict Mode
« on: June 04, 2019, 12:02:22 PM »
damit man es auch wieder findet

der Vorgang "Item duplizieren" erzeugt unter MYSQL-Strict Mode auf Grund einer unvollständigen Anweisung keinen Insert.
Zur Behebung in Datei save_item.php  ~ Zeile 603 diesen Original-Code

engl Translation
The "Duplicate Item" operation does not create an insert under MYSQL-Strict Mode due to an incomplete statement.
To fix in file save_item.php ~ line 603 this original code

Code: [Select]
// Insert new row into database
$database->query('INSERT INTO `'.TABLE_PREFIX.'mod_'.$mod_name.'_items` (`section_id`, `page_id`, `position`) VALUES ('.(int)$section_id.', '.(int)$page_id.', '.(int)$position.')');

ersetzen durch / replace with
Code: [Select]
// Insert new row into database
    $sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_'.$mod_name.'_items` SET '
      .   '`section_id` = '.(int)$section_id.', '
      .   '`page_id` = '.(int)$page_id.', '
      .   '`title` = \'\', '
      .   '`link` = \'\', '
      .   '`description` = \'\', '
      .   '`position` = '.(int)$position.', '
      .   '`scheduling` = \'\', '
      .   '`main_image` = \'\', '
      .   '`modified_when` = \''.time().'\', '
      .   '`modified_by` = '.(int)$admin->get_user_id().' ';
   
    // Check if there was a db error
    if (!$database->query($sql)){
      $admin->print_error($database->get_error());
    }
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • OFA - Duplicate Item / Issue in MySQL-Strict Mode
 

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