My edited CMS content doesn't show on the website live stage even after published the content in silverstripe 4

Silverstripe Version: 4.1.1

Currently I am facing the issue that in CMS I have edited some fields data and then published that page. But, edited fields value is only appearing on template side for stage= ‘Stage’ not for stage = ‘Live’. Previously it is working fine when I had upgrade to this version from silverstripe 3.X . Currently it is causing publishing issue in CMS side.

Please let me know the solution for this issue if anyone have face the same issue for silverstripe-4.1.1.

Can you post some code of the Page class, the additional fields, etc.?

My guess, having upgraded over 90 classes from SS3 to SS4 recently is to check that you have also “upgraded” the Data associated with your page or data object class.

Don’t forget to also add:
private static $table_name = ‘MyClass’;
to every Page and DataObject so that the NameSpacing doesn’t ruin your database. Although if you do forget it’s easy to fix. Just delete the extra tables in the DB.

This SQL should do an upgrade for a Page Type class:

UPDATE `SiteTree` SET `ClassName` = 'My\\Website\\MyClassHolder' WHERE `ClassName` = 'MyClassHolder';
UPDATE `SiteTree_Live` SET `ClassName` = 'My\\Website\\MyClassHolder' WHERE `ClassName` = 'MyClassHolder';
UPDATE `SiteTree_Versions` SET `ClassName` = 'My\\Website\\MyClassHolder' WHERE `ClassName` = 'MyClassHolder';

This sql for a DO class (non versioned SS3 DO):

UPDATE `MyClass` SET `ClassName` = 'My\\Website\\MyClass' WHERE `ClassName` = 'MyClass';

Where My\Website\ is the Namespace you are using.

Then run /dev/build/?flush

The CMS should pick it all up again and your Live and Stage copies will be there and any Versioned data.