Search code examples
kentico

Kentico rename"Code name" in Widget or Webpart without losing data


I want to rename "Code name" in Widget or Webpart that I have created. After I rename Code name 'FAQItem' to 'FAQ' when I go to Page a content that I have insert into Page it lose.

Here message error "[Error loading the WebPart 'FAQItem' of type 'FAQItem']"

Any idea ?


Solution

  • It is not possible without manually updating all references of that widget on all pages it is used on.

    There is an alternative to run a SQL query against the CMS_Document table and look in the DocumentContent field for %yourCodeName% and do a simple SQL REPLACE(). Here's some documentation regarding widgets and the API.