Developer forum

Forum » Dynamicweb 10 » Problems when setting up a DW10 solution with Swift using Template Conversion Tools

Problems when setting up a DW10 solution with Swift using Template Conversion Tools

Bo Nyby
Reply

Hi there!


I have a clean install of DW10.0.0 Beta006. I have downloaded the latest Swift files from https://doc.dynamicweb.com/downloads/swift (v1.19.0 as of writing) and placed the files in the Files-folder of my solution. The database and product images from the same link have been added as well and is working as expected.


Using the Template Conversion Tools under Settings -> Web & http -> Http we can get a site up-and-running in a somewhat working state, however some pages are not working quite as intended (e.g. individual product pages or the Inspiration page - see below). This is the case when all three debugging/conversion tools are ticked (conversion, saving with 'dw10.cshtml' suffix and loading converted templates). Our end goal is to replace the old files with the newly converted ones by deleting the old and replacing with the converted files by removing the suffix, and therefore not having to use the conversion tools at runtime afterwards.

One problem I've encountered with this approach is that the conversion on some templates seems to happen on rendering, when a page using one or some of the old files is loaded, which in turn means that old .cshtml files not found/hit by manually going through all content pages are simply not converted. This results in not being able to build the solution in Visual Studio as some of the files can't compile. Furthermore, some of the files being converted keeps being flagged as old, even after the old version has been deleted and replaced by the new file. One example of this is the QuoteRequestUser.cshtml found under Files/Templates/Designs/Swift/eCom7/CartV2/Step.

Lastly, it seems that there exists some kind of hybrid files containing both @functions{...} as well as @helper methods e.g. CartCheatsheet.cshtml found under Files/Templates/Designs/Swift/eCom7/CartV2/Step. Windows notes that this was last modified 24/02/2023 which is before I even setup my solution (16/03/2023), so it might not be due to an error in the conversion tool.

So the question here is, is it intended that the conversion tool should convert all templates, so we can use them distributed in a somewhat "clean" DW10/Swift combo with DW10 templates, or do we need to have the conversion tool enabled at all times when using Swift on DW10?

 

Product page:

 

Inspiration page:


Replies

 
Suzi Louring
Reply

+1

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Is this Swift 1.19

 
Bo Nyby
Reply

Yes, I downloaded v.1.19.0

 
Claus Kølbæk
Claus Kølbæk
Reply

A workaround Bo is to exclude the templates folder from your project, that way you won't be getting build errors because of the files in it. - Hopefully at some point there will be a version that does not require the conversion tool in the future :)

 
Bo Nyby
Reply

Fingers crossed, and thank you for the workaround :-)

 

You must be logged in to post in the forum