Detailed instructions how to upgrade 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
I am pretty new to nopCommerce but as Developer
I am very greatful to the community  to have such a good structured shopsystem. I have seen much worse. In development and upgradehandling.
To make something work out of the box can be a real pain, especially when it's meant to work with several
different systems, even if there are nice Microsoft Engines that make it easier.
And I guess, thats where the problem arises. When it's said that a MS Engine works with all sorts of technology
the tripping hazard lies in the details e.g. in this case stored procedures etc..

So my wild guess is:
In Theory because of Linq and Ado.Net nopCommerce would work with any DB-System.
But probably not without consideration in code of some tiny things.
To have these things out of the box would be nice to have thow.

As Development as whole big project can be a nearly bottomless pit, I understand
that some things besides the main SQL Server Solution like MS SQL CE may require different
approaches and need some more developmentwork put into it.

So if there is no answer, there are several possibilities why there has been no answer.
Worst case I can think of,
- you asked at the wrong side, where nobody reads your message or
- the problem was not well described,
- nobody knows the answer why you are having this problem, because [whatever reason]
- too much workload.

So if there is no simple solution to this yet, all we would need is just another work item on this?

All I know is that this is open source and it means it lives from the community that supports it, that puts their own time into it. And I am gratefull for all your work!
11 years ago
I'd like to add some details to the "replace the web.config file from theme orange"

In case you use your own theme and have added some info to web.config,
just make sure that the razor versions are compatible with the rest
make sure that Version=2.0.0.0 in each line of section "sectionGroup" see below:

 <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>


make sure that in section  <system.web.webPages.razor> System.Web.Mvc is Version=4.0.0.0


<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    


make sure that in section system.web Version is 4.0.0.0

<pages
        validateRequest="false"
        pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <controls>
        <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
      </controls>
11 years ago
I really miss an edit feature here...

For NopCommerce Version WITH Source

If you developed your own plugin, you also will need to change

in Description.txt
Supported Versions = 2.70

Some linked assemblies

here are some I had to change


- EntityFramework 5.0.0.0
- .Net Version of Pluginproject needs to be Version 4.5
- System.Web.Mvc 4.0.0.0

changes in web.config of the Plugin


<configSections>
        <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
            <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
        </sectionGroup>
    </configSections>

    <system.web.webPages.razor>
        <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        



 <system.web>
        <compilation targetFramework="4.5">
            <assemblies>
                <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            </assemblies>
        </compilation>
    </system.web>
11 years ago
i would like to add what to do for the CSS files
i didn't like that i needed to compare files and check every line (like mkleef did)
so i change the way i work with the main CSS (styles.css and styles.rtl.css)

i create a new CSS (for example XXX.css)
in the folder XXXTheme\Content

in the file : XXXTheme\Views\Shared\Head.cshtml
i inserted these lines at line 3 - BEFORE the declaration of styles.css and styles.rtl..css
(i thought it should be after, but it appears to be this way...)
these are the lines -
@{
    Html.AppendCssFileParts("~/Themes/XXXTheme/Content/XXX.css");  
}


and then every line i wanted to change in the original CSS
i copied the line to my CSS, and change just the attribute i wanted to change.

for example -
this is the original line from styles.rtl.css -
body{font-family:arial, verdana, helvetica, sans-serif;font-size:12px;background:#444 url(images/bg-body.gif) repeat-x;color:#f93;}

in my css i wrote -
body{font-size:14px;background:#808080 url(images/bkg2.jpg) repeat;}

this way every attribute i didn't write, will be from the original CSS
and every attribute (like the font size or the background) will be overide and will be taken from the new CSS


this way, you can take the original CSS that nop commerce did, and keep in a seperate place just your changes.

Shay
11 years ago
mkleef wrote:
....

2 hours after I started the upgrade I'm still working on the CSS...with about 2/3 done in Notepad++ on the RTL file.

.....

Someone should probably tell people that they will need to spend the best part of a full day doing CSS work to get their site working again...


consider the use of individual templates to do that stuff. Not change the originals.
https://www.nopcommerce.com/docs/72/designers-guide.aspx

sabueXo wrote:

Where are original product images stored? On database?

Thanks!

As far as I can see
the images are stored in table picture and they are mapped to product in table product_picture_mapping
11 years ago
после добавления русского алфафита в строку 691 и без изменений в с строку 691 и запуска скрипта in Microsoft SQL Studio 2008  возникают ошибки:
--
Сообщение 8152, уровень 16, состояние 13, строка 34
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---
Сообщение 8152, уровень 16, состояние 13, строка 36
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---

подскажите как избежать этих ошибок ?
11 years ago
ffrank wrote:
Hello,

first of all thanks that you took the time to write-up a detailed description of the upgrade procedure.

I had recently a question regarding the SQL upgrade script but the nopCommerce team has given no answer yet and therefore I'd like to repeat my question:

I am getting a SQL error when executing the upgrade script.

I installed 2.65 with SQL Server Compact db-file.

After 2.7 came out I wanted to run the upgrade script and it throws an error right away at the first declare @resources XML statement, saying that this statement is unknown for SQL Server Compact / invalid syntax.

I am running VS2012, WebMatrix2 and tried on both platform to run the script but apparently the statement above is simply not supported by SQL Server Compact !?

What is the solution? I don't understand in the first place why an upgrade script is not working right of the box since nopCommerce offers the option to go with SQL Compact. So, I would expect to get a working upgrade script from the get-go.

Anyone who had run into the same issue and knows the solution? Help is very much appreciated. May be I have overlooked something for the upgrade?
Note: Please do not recommend to run nopCommerce on a (full) SQL Server instance -- I had chosen the Compact db-file for a reason and need to know how to upgrade such installation in the future, otherwise it is completely worthless to even offer the Compact db installation option.

Really would appreciate if a nopCommerce team member could comment here and provide a solution.

Frank


после добавления русского алфафита в строку 691 и без изменений в с строку 691 и запуска скрипта in Microsoft SQL Studio 2008  возникают ошибки:
--
Сообщение 8152, уровень 16, состояние 13, строка 34
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---
Сообщение 8152, уровень 16, состояние 13, строка 36
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---

подскажите как избежать этих ошибок ?
11 years ago
shayt wrote:
Hi,
i upgraded my 2.65 site to version 2.70 with no source,
and i wrote detailed instructions how to do that (for myself with future versions, and for a friend of mine).
i saw the readme with the upgrade information,
but i wanted much more details, so i will not have to think how to do it next time.

Please, if you see anything to add or to update, please reply so we will have update instructions.
This is the exact method i did the upgrade.

The instructions -

1. Download both files -
nopCommerce 2.70 - Web (no source) (14.00 MB)
nopCommerce 2.70 - Upgrade script (12 KB)
from - https://www.nopcommerce.com/downloads.aspx
and extract the files.

2. 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
...

3. Backup DB

4. Execute the upgrade script on the DB

5. Shutdown the site

6. Change the name of the main folder to XXX_265 (where XXX is the name of the site name)
this will be the backup of our site of version 2.65

7. Create a new folder with the same site name (XXX)

8. Copy (don't move) all the files and folders from the extracted "nopCommerce 2.70 - Web (no source)"
to the new folder we just created.

9. Overwrite the following files from the XXX_265 folder to the new folder (XXX) :
App_Data\Settings.txt
App_Data\InstalledPlugins.txt
all the files from Folder : Content\Images\uploaded

10. Overwrite the following file from the extracted "nopCommerce 2.70 - Web (no source)" :
DarkOrange\Views\Web.config
to our theme folder :
XXX\theme\MyXXXTheme\Views\Web.config
yes, it's doesn't matter from which theme, as long as this file is copied.

11. Remove the words "Url.Content"
from MyXXXTheme\Views\Shared\Head.cshtml
(it appears twice)

12. if you did changes in the CSS files then -
Compare with beyond compare or something similar the following files :
MyXXXTheme\Content\styles.css
to
DarkOrange\Content\styles.css
(compare the RTL files if you are using RTL)
there are many small changes, and you can't overwrite the file if you made changes to the CSS
(better solution is the have your own CSS apart from the main CSS, but i didn't do that...)

13. if you did any change to other files in your theme,
compare each of them, so you will have the updated version.

14. install .net framework 4.5 from -
http://www.microsoft.com/en-us/download/details.aspx?id=30653

15. run the site, and check !

have fun.

Shay


после добавления русского алфафита в строку 691 и без изменений в с строку 691 и запуска скрипта in Microsoft SQL Studio 2008  возникают ошибки:
--
Сообщение 8152, уровень 16, состояние 13, строка 34
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---
Сообщение 8152, уровень 16, состояние 13, строка 36
Символьные или двоичные данные могут быть усечены.
Выполнение данной инструкции было прервано.
---

подскажите как избежать этих ошибок ?
11 years ago
ENGLISH please.
11 years ago
2. 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 _-абвгдеёжзж_и_так_далее_весь_русский_алфавит'

I use non-english characters -  Russian/

replace line 691 in the upgrade script of the DB to -

SET @allowed_se_chars = N'abcdefghijklmnopqrstuvwxyz1234567890 _-абвгдеёжзийклмннопрстуфхцчшщъьэюя'

after run SQL script I have some errors

Post 8152, Level 16, State 13, Line 34
Character or binary data can be truncated.
The execution of this instruction was interrupted.
---
Post 8152, Level 16, State 13, Line 36
Character or binary data can be truncated.
The execution of this instruction was interrupted.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.