Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: maudio on September 09, 2019, 06:38:39 AM

Title: upgrade from 1.1.21 to 2.0.15 Mysql error
Post by: maudio on September 09, 2019, 06:38:39 AM
Hello, i'm trying to upgrade my forum from 1.1.21 to 2.0.15

during the upgrade process (with upgrade.php) i've got the folling error:

Executing upgrade script 2 of 2.
Executing: "Adding permission profiles for boards." (16 of 42 - of this script)

!!Error!
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id_board IN (15)' at line 3



i'm using  MYSQL v.5.6 on my host.

thanks in advance
Title: Re: upgrade from 1.1.21 to 2.0.15 Mysql error
Post by: shawnb61 on September 09, 2019, 01:27:39 PM
My first theory is that you somehow got a null value as a $profile. 

In the file upgrade_2-0.sql, ~line 1776, change: 
// Update the board tables.
foreach ($board_updates as $profile => $boards)
{
if (empty($boards))
continue;

$boards = implode(',', $boards);


To:
// Update the board tables.
foreach ($board_updates as $profile => $boards)
{
if (empty($boards) || empty($profile))
continue;

$boards = implode(',', $boards);


& let us know if this works!

Note we've seen 2 of these today... 
Title: Re: upgrade from 1.1.21 to 2.0.15 Mysql error
Post by: maudio on September 09, 2019, 05:00:06 PM
It works ! thanks a lot.
great support !