Try our conversational search powered by Generative AI!

Update Page/Content Property



We have updated a CMS6R2 database to CMS7.5 and would like to update a Content (Page) property named MainIntro.

The issue is that in the CMS6R2 MainIntro was of type XHTML (Richtext editor) but now in CMS 7.5 it is type string (no editor).

When we converted pages from CMS6R2 we now got MainIntro with paragraphtags and other html code that we lika to stripout.

I would use a sql script to accomplish this. but I am uncertian on the relation in the database. What I know it seems that the following tables are to be updated. 

Database=dbEPiServer, Table=tblIndexRequestLog, Column=String02
Database=dbEPiServer, Table=tblWorkContentProperty, Column=LongString
Database=dbEPiServer, Table=tblContentProperty, Column=LongString

As you might know I can't do an update on these tables without filtering the specific property MainIntro otherwise all values including MainBody etc will be updated.

So how do I get the "where" clause to get this to update only the specific property.

The property MainIntro is derived from a CorePageTypeBase so there is only one property used for all contenttypes.

Jun 25, 2014 10:56

The database is not updated it has its content imported from exported pages from CMS6.

Edited, Jun 25, 2014 11:15

You should be able to join in tblPropertyDefinition. Something like:

UPDATE tblContentProperty SET .... 

FROM tblContentProperty AS prop INNER JOIN tblPropertyDefinition AS def

ON prop.fkPropertyDefinitionID = def.pkID

WHERE def.Name LIKE 'MainIntro'

Jun 25, 2014 11:32

Ok looks interesting Johan, but should my updates be made on tblContentProperty only or these tables aswell (tblWorkContentProperty, tblProperty)?

Jun 25, 2014 13:30

You should probably update tblContentProperty (published versions) and tblWorkContentProperty (other versions as well). tblProperty is just a backward compability view over tblContentProperty so you should not need to bother about that.

Remember though to backup your database before, just in case...;-)

Jun 25, 2014 13:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.