Page Type version issue

Eric Garrison asked on August 25, 2016 02:47

I am currently fighting a issue with the custom page type. When I edit the Page in the FORM tab, I can update my description field just fine. When I use a PageDatasource and my new repeater, it is going back to my table, but getting the content for the current version. So, basically if the description is added in v1, it pulls, but since versioning does not actually update the custom.NewPageType table, I cannot get the data.

Ideally, i would like to turn off versioning on my custom Page Type. I don't really need the versioning and it will prevent me from pulling the data out of that table from our other application. Is it possible to turn off version tracking on a Custom Page Type?

Correct Answer

Brenden Kehren answered on August 25, 2016 03:07

You'd have to create some custom code to turn the versioning off.

Might I ask why you're using a PageDatasource webpart with a repeater? A standard repeater will do the trick in 99% of the cases I've worked with.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Eric Garrison answered on August 25, 2016 03:35 (last edited on August 25, 2016 03:51)

I was hoping that I would not have to alter code. That code will be in the /Admin where I need to alter.

I was using a PageDatasource to select a given folder. Then Basic Repeater. You are right, I can also use the Standard Repeater and do it in 1 step. I seem to still have issue with it. In the /Admin the preview is showing the right data, but on the live site, I am still getting Version 1 data but admin shows Version 5.

I have found something else out odd. The BIO page type seems to write directly to the table. It writes a Version (when on the version tab) but the Database table is instantly updated also

0 votesVote for this answer Mark as a Correct answer

Richard Sustek answered on August 25, 2016 08:42

The "coupled table" where custom page type fields are stored always contain published data. Isn't it possible that the new version of your page is not published? That would explain why you as an administrator see the latest version, but the live site still contains the published version.

0 votesVote for this answer Mark as a Correct answer

Eric Garrison answered on August 25, 2016 16:04

Richard and Brenden - Both correct. It appears there was a problem with the code. I loaded the .SLN and stepped through, more to see that where I would have to alter, and found a error. My new PageType was actually erroring and not saving to the table properly. I was on Patch 11. I deleted my custom page type, patched code up to current hotfix available then recreated.

It is now saving data properly again.

0 votesVote for this answer Mark as a Correct answer

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