Developer forum

Forum » Templates » DwTemplateTags resulting in error

DwTemplateTags resulting in error

Hans Ravnsfjall
Reply

Hi

 

I have a very annoying problem, that is if i insert DwTemplateTags into a show product template, I get an error. And therefore i can get no data output.

 

Here is an example http://wenzel.fo/Default.aspx?ID=415&ProductID=PROD1048

The problem was at first everywhere that i put DwTemplateTags, wether it was a page or a paragraph template. I fixed most of it by deleting everything in the _Parsed folder (page templates).

 

But I cant seem to get it to work, and I always get this error message. I have tried to get the Dynamicweb service desk to solve this since it must be a problem in the parser, with no luck. They point to it probably being a template issue, but i have teste on many websites (this is a multi website solution) , and the error is everywhere. Also on websites that have been running since 2006, and where I know that DwTemplateTags has worked before.

 

Hope someone can help, because I am really stuck here.


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

Do you have any product fields of type long text? They used to be stored as ntext in the database, but have changed to be stored a nvarchar(max). This may be the issue here.

Best regards,
Mikkel

Votes for this answer: 1
 
Merethe Nielsen
Reply

Hi,
 

I managed to login to your backend one (now I haven't access - 401 error) and take a copy of your product detail template. I have used it on my own test site and it doesn't return an error with dwtemplatetags enabled.
http://screencast.com/t/jFghLMbjVg

I can't investigate it further myself due to an error "401 - Unauthorized: Access is denied due to invalid credentials" on your backend page right now.

It's not a general problem with DwTemplateTags, but you could have something in your setup that breaks it.

Try to strip your template and only insert a few simple product tags together with DwTemplateTags enabled to see it it works. If it works then put more code in the template until it fails. Then you might to be able to see what loop/tag that gives the problem.
 

Kind regards,
Merethe

 
Hans Ravnsfjall
Reply

Hi

 

thanx for the quick response. The solution is being moved right now, so it is locked. Should be available again within an hour.

 

I expect Mikkel is on the right track. We do have quite a few custom product fields, and they have been there since 2006.

How would we fix this so that no data gets lost?

 

Also, it doesn´t work to create new custom product fields. Could this be releated?

 

 

 
Mikkel Ricky
Reply

It should be possible to change the column types in the database without any data loss (cf. http://stackoverflow.com/a/4708483), but we should check this with a database expert (which I am not).

 

 
Hans Ravnsfjall
Reply

Ok, thank you very mutch for your help.

 

We will encurage the support looking in to the possible proble regarding the Productfields.

 
Hans Ravnsfjall
Reply

Thank You very mutch for your costructive aproach both of you

Mikkels suggestion proved to be the problem, and the Support has fixed it - and everything is fine now :)

 

You must be logged in to post in the forum