krause
I'm new here

Migrating from CMS_INPUT_TEXTAREA to CMS_INPUT_DOM

Jump to solution

Hey community,

is there any easy way to change a CMS_INPUT_TEXTAREA component to a CMS_INPUT_DOM?

Of course we want to keep the data!

First I thougth text is text, but changing from

<CMS_INPUT_TEXTAREA name="st_text" allowEmpty="yes" convertEntities="standard" hFill="yes" useLanguages="yes">

        <LANGINFOS>

               <LANGINFO lang="*" label="Text"/>

        </LANGINFOS>

</CMS_INPUT_TEXTAREA>

to

<CMS_INPUT_DOM name="st_text" allowEmpty="yes" hFill="yes" rows="10" useLanguages="yes">

        <LANGINFOS>

             <LANGINFO lang="*" label="Text" description="Text"/>

        </LANGINFOS>

</CMS_INPUT_DOM>

induced a data loss :smileycry:

Is the only way a migration script?

Thanks a lot for your hints,

Steffi

FirstSpirit4.2.484.54957

0 Kudos
1 Solution

Accepted Solutions
feddersen
Community Manager

Yes, you need to write a migration script to accomplish that.

View solution in original post

0 Kudos
3 Replies
feddersen
Community Manager

Yes, you need to write a migration script to accomplish that.

0 Kudos

Thanks Christoph for your quick answer!

Are there any best practices for such demands?

The component should not change the name, so I would do something like this:

  • copy value from CMS_INPUT_TEXTAREA "st_text" to a new helper CMS_INPUT_TEXTAREA "st_text_old" per script
  • change type of "st_text" to CMS_INPUT_DOM manually
  • copy old value "st_text_old" to new CMS_INPUT_DOM component "st_text" as DomElement value per script

Are there any easier ways?

I guess it will be costly because I have to replace the textareas in pagetemplates, sectiontemplates and tabletemplates in the same way...

Thanks a lot and best regards,

Steffi

0 Kudos

I don't know an easier way, sorry.

0 Kudos