News:

Wondering if this will always be free?  See why free is better.

Main Menu

Upgrade Error

Started by iso, February 13, 2019, 10:15:06 PM

Previous topic - Next topic

iso

Hi,

I want to upgrade from smf 2.0.15 to 2.1 RC1 and run into the following error:

Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made!
Executing upgrade script 1 of 2.
Executing: "Updating attachment data..." (12 of 41 - of this script)
Error!
Data too long for column 'fileext' at row 288

shawnb61

Interesting, that step is part of the 2.0 update, which is re-run to ensure you're properly set to 2.0 first.

It appears that you have a filename with an extension that is longer than expected, i.e., more than 8 characters. 

Maybe try to rename it?   This sql may help you find the problem filename:
SELECT filename FROM `smf_attachments` WHERE INSTR(REVERSE(filename), '.') > 9 and attachment_type <> 3;

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

Very strange we haven't seen that before.  That 2.0 script should probably handle that...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

albertlast

in the sql part of this upgrade i see no protection of this issue.


UPDATE {$db_prefix}attachments
SET fileext = LOWER(SUBSTRING(filename, 1 - (INSTR(REVERSE(filename), '.'))))
WHERE fileext = ''
AND INSTR(filename, '.')
AND attachment_type != 3;

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

albertlast

Since the smf setup should be already a 2.0.15
would be value of the existing fielext also good to know:

SELECT filename,fileext FROM `smf_attachments` WHERE INSTR(REVERSE(filename), '.') > 9 and attachment_type <> 3;

shawnb61

Iso,

What version are you upgrading from?

My guess is somewhere in the 1.x?

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

iso

#7
Hi,

Quote from: shawnb61 on February 13, 2019, 11:27:19 PM
Interesting, that step is part of the 2.0 update, which is re-run to ensure you're properly set to 2.0 first.

It appears that you have a filename with an extension that is longer than expected, i.e., more than 8 characters. 

Maybe try to rename it?   This sql may help you find the problem filename:
SELECT filename FROM `smf_attachments` WHERE INSTR(REVERSE(filename), '.') > 9 and attachment_type <> 3;

There are 3 files showing up with this query:

foo_jscript_panel-v1.3.2.2.fb2k-component
foo_jscript_panel-v1.2.3.1.fb2k-component
foo_uie_wsh_panel_mod-1.6.3.fb2k-component


The fileext value is not set for these files.


Quote from: shawnb61 on February 14, 2019, 12:26:47 AM
Iso,

What version are you upgrading from?

My guess is somewhere in the 1.x?


No, like I already wrote version 2.0.15 is installed, we run a lot of updates through the paket manager, my Mod list is below (only Update packets listed).
Also I run all integrity and database checks without any error before the upgrade process.

SMF 2.0.14 Update 1.0
3. SMF 2.0.11 Update 1.0
4. SMF 1.1.21 / 2.0.10 Update 1.0
5. SMF 2.0.12 Update 1.0
6. SMF 2.0.15 Update 1.0
9. SMF 2.0.13 Update 1.0
12. SMF 1.1.20 / 2.0.9 Update 1.0

shawnb61

Yep, this is an issue & has been confirmed.  There is a fix proposed up on Github you can try:
https://github.com/SimpleMachines/SMF2.1/pull/5430

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp


Advertisement: