Developer forum

Forum » Swift » Installing swift on an existing solution?

Installing swift on an existing solution?

Tina Engelsen Pedersen
Reply

Hi 

If you have an existing solution with a couple of running websites on it already, how do you go about installing swift on it? Of course you have to make sure to upgrade to the newest Dynamicweb version before adding swift to the solution, but what are the steps after that?

Are you able to add a new site to your solution that is running swift, and still run the existing websites like normal, without using the visual editor abd so on?


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Tina,

We have already made some of these conversions (or at least we have started them).

My approach was to create a separate website on the same solution.

I have copied all of the Swift's ItemTypes and dependencies (in most cases I just copied over most of the Files folder).

Then I have configured the Website settings.

Last part is to recreate all pages that are required for proper functionality. Everything under "Swift tools".

The old website and new website could run in parallel as the ItemTypes do not collide.

I hope this helps.

Adrian

 
Tina Engelsen Pedersen
Reply

Hi Adrian

It does :) 

Has the addition of swift on your older solution affected how you work on the old website? Are you still able to add, edit, drag'n'drop paragraphs, etc., as you used to on the old website, or does the visual editor affect the way you work on the old site?

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Tina,

Everything works as before the Swift addition. They don't interfere in any way.

Of course, the Design folder is separate. You have the Rapido one for the current projects and a Swift one for swift-based websites.

The Visual Editor is contextual to the page you are editing. It's just a way of rendering the content of the page in a visual manner. Everything happens in your browser and the data is saved in the corresponding GridRows and Paragraphs.

You can safely go ahead and start configuring Swift.

Adrian

 
Christoffer Rosendahl Frede
Reply

Hi Adrian.

Did any of the swift installation on a existing solution require you to install a swift database ?

Best regards Christoffer

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Christoffer,

No. The swift database will create the pages, paragraphs, and settings for you. In my case, I had to re-create them manually, which is not very efficient.

I've heard that you may now use the Deployment tool to migrate pages from an existing Swift installation to your desired target.

I cannot confirm nor deny if it works. i have not been able to test it myself.

Adrian

 
Christoffer Rosendahl Frede
Reply

Okay great.

the reason i am asking is that, i have added swift to an existing website and added Design and Layout pages and most things seem to be working but the visual editor looks wierd when i open the it: see attached image.

have you seen something like this and maybe have some insight how i can fix it ?

Best regards Christoffer

VsEditorError2.png
 
Nicolai Pedersen
Reply

You probably have to set the correct item types on the website settings.

 
Christoffer Rosendahl Frede
Reply

thank you Nicolai,

but i have done that.

all thought i did get an error when adding the master in website properties in the template "Items/Swift_ThemeSelectorMini.cshtml

ystem.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_e6198a0121614cf79be7ccb0d87203c9.Execute()
 in D:\dynamicweb.net\Solutions\Skabertrang\thors.dw9.dynamicweb-cms.com\files\Templates\Items\Swift_ThemeSelectorMini.cshtml:line 12

i resolved it by deleting that line of code in the template and back in website settings the error was gone and i could select themes and layout and so on.

but maybe the error is causing the issue stil and i am not seeing it.

 

 
Nicolai Pedersen
Reply

That indicates that you are missing the "branding" page. You need to specify the branding page on website settings. Also themes page needs to be pointed out.

 

You must be logged in to post in the forum