Problem upgrading database from 2.65 to 2.70

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hello,

I'v started to upgrade my 2.65 shop to 2.80 and so started to update database to 2.70 first using upgrade script.
But i'm getting errors during update.

Errors are like:
Msg 8152, Level 16, State 13, Line 35
String or binary data would be truncated.

They are caused by this part of the script first for table Products:

INSERT INTO [UrlRecord] ([EntityId], [EntityName], [Slug], [LanguageId])
VALUES (@sename_existing_entity_id, @table_name, @sename, 0)

Because sename is like:
--1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1
(255 chars long - in script sename is nvarchar(1000))

And in database sename is nvarchar(200).
So sename is getting truncated.

Is it a normal behavior?
Also that -1-1-1 looks like a really strange sename...
11 years ago
if you use non-english characters (like Hebrew, Russian, ...)
replace line 691 in the upgrade script of the DB to -
SET @allowed_se_chars = N'abcdefghijklmnopqrstuvwxyz1234567890 _-אבגדהוזחטיכךלמםנןסעפףצץקרשת'
or
SET @allowed_se_chars = N'abcdefghijklmnopqrstuvwxyz1234567890 _-абвгдеёжзж_и_так_далее_весь_русский_алфавит'
or
...

more details on the upgrade from 2.65 to 2.70 -
https://www.nopcommerce.com/boards/t/20840/detailed-instructions-how-to-upgrade-from-265-to-270.aspx

Shay
11 years ago
It does not help. Yes I have Russian characters in product names. Tried to add lowercase and uppercase.
-1 is still rising
11 years ago
You might find this post useful:

https://www.nopcommerce.com/boards/t/21921/upgraded-from-265-to-280-bad-request-url-invalid-when-selecting-some-products.aspx
11 years ago
Thanks everyone. I'v found a problem using debugger...

1st local language characters should be added to the allowed_se_chars value as mentioned above.

And also here is it declaration in script:

DECLARE @allowed_se_chars varchar(4000)

As you can see it is "varchar". Because of this my Cyrillic characters were converted to ??????????? and not found by CHARINDEX.
Change it to Nvarchar and all will work.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.