Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > CMS Save all virtual objects to disk errors View modes: 
User avatar
Member
Member
babupuchakayala-letuie - 6/29/2012 3:23:08 PM
   
CMS Save all virtual objects to disk errors
I am new to CMS. I download all objects from cmssitemanager and i added those files to my local application. When I am trying to publish the code I am getting errors from CMSWebPartLayouts application folder.

Eng_DashBoardNewMessages---newLayout.ascx file in the CMSWebPartLayouts folder inheriting the another ENgDashboardmessages.ascxfile in CMSEngage folder.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="~/CMSWebPartLayouts/Eng_DashBoardNewMessages---newLayout.ascx.cs"
Inherits="CMSEngage_WebParts_Misc_EngDashBoardMessages_Web_Deployment" %>


and the ENgDashboardmessages.ascx is having below code..

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="~/CMSEngage/WebParts/Misc/EngDashBoardMessages.ascx.cs"
Inherits="CMSEngage_WebParts_Misc_EngDashBoardMessages" %>

<cms:QueryRepeater ID="rptMessages" runat="server" OnItemDataBound="Messages_ItemDataBound" />
<div class="Pager">
<cms:UniPager ID="pagerElem" runat="server" />
</div>
<cms:ImageSelector />


my error is when i am trying access the "rptMessages" in Eng_DashBoardNewMessages---newLayout.ascx file.. its saying The name 'rptMessages' does not exist in the current context .....

I am unable to compile the CMSWebPartLayouts folder. Why is that? Am i missing something?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/29/2012 5:01:36 PM
   
RE:CMS Save all virtual objects to disk errors
Hi,

Could you please explain the reason why are you doing it? The virtual objects are in the database and saving them to the disk should be done only under some special circumstances like when using medium trust, pre-compiled web site and so on.

I am not following why would you add those files to your custom project? I would rather go the way to create a backup of the DB, restore it locally and then save the virtual objects to disk so the things will match.

Best regards,
Juraj Ondrus

User avatar
Member
Member
babupuchakayala-letuie - 6/29/2012 5:10:37 PM
   
RE:CMS Save all virtual objects to disk errors
Right now we are not using precompiled websites in live server. due to some issues now we want to use pre compiled websites. so when i importing the objects from cms database and add it to cms project and when i am trying to publish it i am getting errors in CMSWebPartLayouts folder.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/29/2012 5:59:01 PM
   
RE:CMS Save all virtual objects to disk errors
Hi,

I am not clear about "add it to cms project". Could you please explain this?
Have you tried to save the virtual objects to disk locally, from your DB and not from another DB?

Best regards,
Juraj Ondrus

User avatar
Member
Member
prasadpbr-gmail - 7/2/2012 9:34:23 AM
   
RE:CMS Save all virtual objects to disk errors
yes.. i saved the virtual objects to disk locally and after that when i tried to publish it I am getting errors.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/5/2012 3:11:30 PM
   
RE:CMS Save all virtual objects to disk errors
Hi,

It is very strange. Could you please describe in details all the steps and also all the customizations you have made so I can reproduce the issue on my end?

Thank you.

Best regards,
Juraj Ondrus

User avatar
Member
Member
babupuchakayala-letuie - 7/9/2012 11:48:18 AM
   
RE:CMS Save all virtual objects to disk errors
i went to cmssitemanager/administration/system/deployment/ and i save all my virtual objects to disk. and i got the following folders.

Document transformations: ~/CMSTransformations
Shared layouts: ~/CMSLayouts
Custom page template layouts: ~/CMSTemplateLayouts
Web part layouts: ~/CMSWebPartLayouts
Ad-hoc template layouts: ~/CMSAdhocTemplateLayouts

and when i run the application i got errors from "CMSWebPartLayouts" folder. Thats all i did. What do you mean by customizations (Sorry I am new to cms). I didn't get it. could you explain?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/11/2012 2:54:20 AM
   
RE:CMS Save all virtual objects to disk errors
Hi,

I tried it several times. I am using Kentico 6 with latest hotfix. I tried build and rebuild the project as well as publish it via Visual studio with the virtual objects saved to disk and every time the operation was successful.

What I meant by customization is adding any custom code or modifying any default code in Kentico.

Are you able to reproduce this issue also using a clean installation of the CMS?

Best regards,
Juraj Ondrus

User avatar
Member
Member
babupuchakayala-letuie - 7/11/2012 10:14:48 AM
   
RE:CMS Save all virtual objects to disk errors
I am using v5.5.4491 version. We didn't modify kentico default code. do we need add any kind of references for cmswebpartslayout folder?

User avatar
Member
Member
babupuchakayala-letuie - 7/11/2012 12:37:38 PM
   
RE:CMS Save all virtual objects to disk errors
I am getting all these errors in my custom(web parts layout) code.

I have created new web part called "Eng_DashBoardNewMessages" and filename as "~/CMSEngage/WebParts/Misc/EngDashBoardMessages.ascx" and in the layout tab i have "groupsviewernew" layout and the code is below.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="~/CMSEngage/WebParts/Misc/EngDashBoardMessages.ascx.cs"
Inherits="CMSEngage_WebParts_Misc_EngDashBoardMessages" %>
<%@ Register Src="~/CMSWebparts/Community/Groups/GroupsFilter_files/GroupsFilterControl.ascx"
TagName="GroupsFilterControl" TagPrefix="cms" %>
<%@ Register TagPrefix="cms" Namespace="CMS.Community" Assembly="CMS.Community" %>
<cms:GroupsFilterControl ID="filterGroups" runat="server" />
<div style="background-color:#4E5E6A;left:176px;position:absolute;top:25px;width:233px;z-index:100">
<cms:BasicRepeater ID="repGroups" runat="server" />
</div>
<cms:GroupsDataSource ID="srcGroups" runat="server" />
<div class="Pager">
<cms:UniPager ID="pagerElem" runat="server" />
</div>


when save all my virtual objects to the disk... the code is looks like below.. it changes the page directives..

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="~/CMSWebPartLayouts/Eng_DashBoardNewMessages---GroupsViewernew.ascx.cs"
Inherits="CMSEngage_WebParts_Misc_EngDashBoardMessages_Web_Deployment" %>
<%@ Register Src="~/CMSWebparts/Community/Groups/GroupsFilter_files/GroupsFilterControl.ascx"
TagName="GroupsFilterControl" TagPrefix="cms" %>
<%@ Register TagPrefix="cms" Namespace="CMS.Community" Assembly="CMS.Community" %>
<cms:GroupsFilterControl ID="filterGroups" runat="server" />
<div style="background-color:#4E5E6A;left:176px;position:absolute;top:25px;width:233px;z-index:100">
<cms:BasicRepeater ID="repGroups" runat="server" />
</div>
<cms:GroupsDataSource ID="srcGroups" runat="server" />
<div class="Pager">
<cms:UniPager ID="pagerElem" runat="server" />
</div>

User avatar
Member
Member
babupuchakayala-letuie - 7/11/2012 4:41:28 PM
   
RE:CMS Save all virtual objects to disk errors
when you create a layout for ascx file in which table its going to save that information?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/12/2012 2:26:58 AM
   
RE:CMS Save all virtual objects to disk errors
Hi,

In this case it is CMS_WebPartLayout table.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/12/2012 2:26:13 AM
   
RE:CMS Save all virtual objects to disk errors
Hi,

And this is exactly what I menat by customizations! :-)

The first code snippet is from web part and the second one is the layout - so they should be different, this should be OK.

Are you getting the errors also when not using this customization?

Best regards,
Juraj Ondrus

User avatar
Member
Member
babupuchakayala-letuie - 7/12/2012 4:48:37 PM
   
RE:CMS Save all virtual objects to disk errors
I figured out that. Looks like we have some old layouts which we are not using. So when save our all my objects to the disk it gets get saved and throwing errors.

Thanks for your help jurajo.