Error in Latest news and updates webpart after Kentico upgrade to 12

Mujahid Ali asked on January 28, 2019 07:51

I upgraded kentico 10 to 11 then 11 to 12. But at the end I found the given error in News and Blog.

[TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=f265b57e-7358-44f6-8d96-f876890461a6/CMS.BlogPost/HomeNewsEvents.ascx(4): error CS0103: The name 'GetFileUrl' does not exist in the current context[TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=f265b57e-7358-44f6-8d96-f876890461a6/CMS.BlogPost/HomeNewsEvents.ascx(4): error CS0103: The name 'GetFileUrl' does not exist in the current context[TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=f265b57e-7358-44f6-8d96-f876890461a6/CMS.BlogPost/HomeNewsEvents.ascx(4): error CS0103: The name 'GetFileUrl' does not exist in the current context

One more thing Blog is also empty in cms but I found data in CONTENT_BlogPost table. CodeUpgrade.exe did not capture this issue. Although site is working well. But this webparts rendering error. There is no error in error list regarding this issue.

Recent Answers


Juraj Ondrus answered on January 28, 2019 12:35

Hi,
You may need to adjust the transformation methods used in your transformations and adjust them according to the API changes.

0 votesVote for this answer Mark as a Correct answer

Mujahid Ali answered on February 1, 2019 09:27

I replaced GetFileUrl to GetImage but I still having problem in appending attributes like alt

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on June 26, 2019 19:13

Why was this changed? Also, how would I pull in the actual file name?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on July 8, 2019 08:26

It was changed for better variant support. The method's file name parameter does not have to correspond with the real file name. The file name could be fake or you can use the the field name to evaluate - but depending on the form control used, the GUID may be returned. So, you can create a custom transormation method which will take the GUID and check the attachment name using the API.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.