Advertisement:

Author Topic: Upgrade Error  (Read 483 times)

Offline iso

  • Semi-Newbie
  • *
  • Posts: 35
  • Gender: Male
    • herzog-network on GitHub
    • @herzog_network on Twitter
    • Blog @ herzog.network
Upgrade Error
« on: February 13, 2019, 10:15:06 PM »
Hi,

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

Code: [Select]
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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,987
    • sbulen on GitHub
Re: Upgrade Error
« Reply #1 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:
Code: [Select]
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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,987
    • sbulen on GitHub
Re: Upgrade Error
« Reply #2 on: February 13, 2019, 11:45:42 PM »
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

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 639
Re: Upgrade Error
« Reply #3 on: February 13, 2019, 11:49:49 PM »
in the sql part of this upgrade i see no protection of this issue.

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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,987
    • sbulen on GitHub
Re: Upgrade Error
« Reply #4 on: February 13, 2019, 11:52:17 PM »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 639
Re: Upgrade Error
« Reply #5 on: February 14, 2019, 12:02:34 AM »
Since the smf setup should be already a 2.0.15
would be value of the existing fielext also good to know:
Code: [Select]
SELECT filename,fileext FROM `smf_attachments` WHERE INSTR(REVERSE(filename), '.') > 9 and attachment_type <> 3;

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,987
    • sbulen on GitHub
Re: Upgrade Error
« Reply #6 on: February 14, 2019, 12:26:47 AM »
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

Offline iso

  • Semi-Newbie
  • *
  • Posts: 35
  • Gender: Male
    • herzog-network on GitHub
    • @herzog_network on Twitter
    • Blog @ herzog.network
Re: Upgrade Error
« Reply #7 on: February 14, 2019, 06:33:47 AM »
Hi,

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:
Code: [Select]
SELECT filename FROM `smf_attachments` WHERE INSTR(REVERSE(filename), '.') > 9 and attachment_type <> 3;

There are 3 files showing up with this query:

Code: [Select]
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.


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.

Code: [Select]
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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,987
    • sbulen on GitHub
Re: Upgrade Error
« Reply #8 on: February 14, 2019, 11:56:46 AM »
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

Offline iso

  • Semi-Newbie
  • *
  • Posts: 35
  • Gender: Male
    • herzog-network on GitHub
    • @herzog_network on Twitter
    • Blog @ herzog.network
Re: Upgrade Error
« Reply #9 on: February 14, 2019, 02:08:55 PM »
Fixed, thanks.