Can't edit home page Template or Web Parts

Kayla Johnson asked on May 15, 2018 20:38

I'm having issues making changes to the home page on our client's intranet. I have a page set up called Development that's not linked in the menu where I'm developing the web parts for existing pages so that I'm not working on a live page. One piece is ready to move live on the Home page.

When I make a change to to the Home Page's template, to add a JS to the Header, I get the following error: https://pasteboard.co/HlkpvKi.png

And when I try to copy and paste the web part from the Development page to the Home page, it doesn't look like it Pastes right away, but does show up when you refresh the page. When I try to edit that web part in any way, it simply errors out: https://pasteboard.co/HlkpVvg.png

This is the error log: https://pasteboard.co/Hlkq1I4.png

I can't make heads or tails of this. It's only on this page and nothing major has been changed here recently. Like I've explained above, there's issues with both web parts and the template.

The other weird thing is, it looks like the web part and template changes get made. But if I go back later to the site, they're no longer there, like they never got added in the first place. What is going on?

Recent Answers


Rui Wang answered on May 15, 2018 22:18

By any chance you have multiple web server/local PC connecting to the same database?

0 votesVote for this answer Mark as a Correct answer

Dragoljub Ilic answered on May 16, 2018 10:28 (last edited on May 16, 2018 13:04)

Hi Kayla,

You should start from event logs first. Check in the event logs details of the error when this occurs on your Home page.

EDIT: Sorry, I didn't noticed that you already attached log details. You can try by going into Page Templates application, and when you select Home page template, you can look into 'Web Parts' tab for inconsistency of web parts that makes you trouble. You can remove them from that xml, and try to re-add them on design tab again.

Best regards, Dragoljub

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 17, 2018 07:23

Hi,
What version of Kentico are you using? Are you using also the latest hotfix? If not, I would try applying the latest hotfix for your version first so we can exclude already known and fixed issues.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 7, 2018 22:35

Juraj, I had the client's IT person do the hotfix and we are still seeing this issue. here is the full stack trace/error and a screenshot of any web part when I try to make any change: https://prnt.sc/js8xd9

I changed the template to a brand new template from scratch and we are still seeing this.


Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Exception type: System.Web.HttpUnhandledException Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.cmsmodules_portalengine_ui_webparts_webpartproperties_properties_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\e0225442\59b957da\App_Web_webpartproperties_properties.aspx.21ae289f.x1tjhjbu.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Message: Object reference not set to an instance of an object.

Exception type: System.NullReferenceException Stack Trace: at CMS.DataEngine.SimpleDataClass.CopyOriginalDataTo(IDataClass target) at CMS.DataEngine.AbstractInfoBase1.Clone() at CMS.DataEngine.AbstractInfoBase1.Clone(Boolean clear) at CMS.DataEngine.AbstractInfoBase1.CloneObject(Boolean clear) at CMS.Synchronization.SynchronizationHelper.LogObjectChange(LogObjectChangeSettings settings) at CMS.Base.CMSEventArgs.CallFinishActions() at CMS.Base.AdvancedHandler2.Finish() at CMS.DataEngine.AbstractInfoBase1.UpdateData() at CMS.DataEngine.AbstractInfoProvider3.SetInfo(TInfo info) at CMS.PortalEngine.PageTemplateInfoProvider.SetPageTemplateInfoInternal(PageTemplateInfo template) at CMS.PortalControls.CMSPortalManager.SaveTemplateChanges(PageInfo pi, PageTemplateInstance instance, WidgetZoneTypeEnum zoneType, ViewModeEnum viewMode, TreeProvider tp) at CMSModules_PortalEngine_Controls_WebParts_WebpartProperties.Save() in D:\CoffmanTech\Alliance\Kentico\CMS\CMSModules\PortalEngine\Controls\WebParts\WebpartProperties.ascx.cs:line 879 at CMSModules_PortalEngine_Controls_WebParts_WebpartProperties.OnSave() in D:\CoffmanTech\Alliance\Kentico\CMS\CMSModules\PortalEngine\Controls\WebParts\WebpartProperties.ascx.cs:line 696 at CMSModules_PortalEngine_UI_WebParts_WebPartProperties_properties.b__4_0(Object sender, EventArgs args) in D:\CoffmanTech\Alliance\Kentico\CMS\CMSModules\PortalEngine\UI\WebParts\WebPartProperties_properties.aspx.cs:line 66 at CMS.PortalControls.WebPartFramesManager.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 8, 2018 07:25

Thank you! But, what is the Kentico version you are using? Also, I guess this was working fine some time before - what was changed/customized or configured before this error started? Even if it sounds unrelated to you, please mention anything you can remember what was changed.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 8, 2018 21:21

I did not setup the Kentico install so I'm not 100% sure. I do not manage it - the client does. But if I click the ? icon at the top of the admin panel, it says v9.0. We have not made any changes that I'm aware of.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 12, 2018 15:40

I figured out that a user from the client's company had made a change to the template, causing it not to work. (I couldn't even create an adhoc version of the template on a new page). I rolled it back to my original version and it works now. Is there not a way though to tell what changes were made to the template by her? I would like to know what she did that would affect the template to not be updatable.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on June 12, 2018 15:46

Kayla, there is checkin/out function for objects like page template, so you can track who made what change easily.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on July 23, 2018 19:22

This is still happening on our site with no indication of what's causing it. The only recent changes to the home page are made by my user. Just simple adding new web parts. I can fix it by reverting to an older version. But there's nothing that I do that should cause it to break like this. We can't keep reverting templates and adding the same web parts back every few days.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on July 24, 2018 10:30

Hi, would it be possible to describe us all the steps made? What web parts were added? Are you able to reproduce it by adding any web part or just by adding some certain web parts?

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on July 24, 2018 19:26

Juraj,

In the Special Pages folder are some Development pages I work on whenever the client wants a new feature added to their Home page. These pages are not linked in the menu anywhere. When it's time to move these web parts live, I copy them from this page and paste them onto the home page template.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on July 25, 2018 10:43

Thank you for the details. But, I am still not clear on what web parts are we talking about - is this across any kind of web part, even the out of the box web parts or does this happen to certain web parts only? What are the web part names - repeater, editable region, etc?
Are there any errors in the browser console while copying and pasting the web parts? Maybe there is some custom Javascript interacting with the default UI scripts and breaking the functionality. Could you please try creating two blank testing pages, set the Page nesting to none in the Properties -> Template section and test the copy&paste of the web parts? If it works here, then there is some custom script somewhere - maybe on the master page, breaking the UI scripts functionality.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on August 7, 2018 18:06

Here is some debugging I've done, I think we're getting closer:

Yesterday, again, the home page did not allow us to edit any web parts. So I had to revert to the latest working version (which was just 1 version down). In doing that, a subscription web part got deleted. So I copied and pasted it from our "staging" page (just a hidden page in the Special Pages folder). For the rest of the day the page worked fine. I believe this has been the case any time we copied and pasted any web part to the Home Page. I don't believe it's related to the Master Template since the Home Page has its own template. The Home page is now on "HomePageV3" Template Name, so it's not an issue with the Home page template itself because I have made multiple templates for it.

But going back to my statement about copying and pasting yesterday.. Like I said, the home page worked fine yesterday. But then this morning, the home page would not allow us to edit web parts again. I think something is happening overnight to the page template after a web part has been copied from a different page and pasted.

Is it because my development page that I copy web parts from is in the Special Pages folder? It doesn't have any special permissions that I can see.... Has this been seen before? Wondering if you can replicate? We are running 9.0.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on August 7, 2018 23:37

We connected with the client's server guy. And we figured out it was a versioning issue. We turned off object versioning and the issue is resolved for now....Wondering if this has been seen before?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 8, 2018 10:31

Thank you! I am sorry but I have not seen this before and from your description are not clear the steps I need to take to reproduce the issue - I do not know what web parts are you using and how are you copying them. Since you are using versioning, is it possible that multiple people are working on the same template? Or, are you using locking for exclusive access for one user only? I would really need to know clear steps you are doing, what web parts are you using and so on to try reproducing the issue or to better understand what you are actually doing.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on August 8, 2018 22:44

It is all web parts. I am the only user. I use the copy feature from the Kentico Design tab, and paste into a Region on the page.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 9, 2018 12:10

Thank you for the details - I tried reproducing the issue on Kentico 9 with latest hotfix but no luck - I was able to copy the web parts all the time between the pages. It is very strange issue - maybe there is something else corrupting the object versions.

0 votesVote for this answer Mark as a Correct answer

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