Change transformation name

Shawn Ebeyer asked on February 12, 2016 16:01

Hi there,

I'm working on a fairly large Kentico project (aren't they all?) and we've noticed there is a misspelled transformation. Is there anywhere in Kentico that I can see every place this particular transformation is being used? I would love to avoid having to click on each page template to look.

Any help would be amazing.

Thanks in advance,

Shawn

Recent Answers


Brenden Kehren answered on February 12, 2016 16:20

There is no place in the UI to find this. You can however, query the template table and look for that name. It would be a query something like this:

select *
from CMS_PageTemplate
where PageTemplateWebParts like '%>Namespace.ClassName.TransformationName<%;

I include the > and < simply to ensure you're looking at the actual property name. You could include the whole property string:

<property name="transformationname">Namespace.ClassName.TransformationName</property>

If you're looking for just the listing transformation name. Once you have your WHERE condition set (be sure to check for a site ID or NULL if a multi-tenancy instance) you should be able to perform a REPLACE on the PageTemplateWebParts field.

A couple notes: 1. Be sure to stop your instance before doing this update. 2. If you didn't stop your instance before doing the update, be sure to clear your cache on the server/machine prior to starting development again.

2 votesVote for this answer Mark as a Correct answer

emma zelewsky answered on February 12, 2016 16:25

You might try to narrow down where to look by going to Page Types-->[parent type of transformation]-->Pages tab. This will list all the places where that parent page type is used. If there are a whole lot of pages listed, you might try narrowing it further, by clicking the menu icon on the left of the list header (next to Actions) and choose Advanced export, which lets you enter a Where clause. Hope that helps.

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on February 12, 2016 17:34

Thank you Brenden and Emma,

I will give both a try and see what works!

Cheers,

Shawn

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 12, 2016 21:24

So the pages the page type is use in might help but I wouldn't put money on it simply because the transformations are set at the page template level and not the page level.

1 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on February 23, 2016 15:20

Yes, I agree with Brendon. What Emma has suggested to you will only provide information on the Page level. Also, since you can create a Page transformation under any page and can use it anywhere, it may infact give you a wrong picture.

0 votesVote for this answer Mark as a Correct answer

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