Clone template as Ad-Hoc causes error

Darryn Flood asked on January 8, 2018 06:37

Hi,

I've come across an unusual error that I'm hoping someone can help me with as I'm a complete newbie with the Kentico CMS.

When I create/copy a page, and then choose the option to "Clone template as Ad-Hoc" on the new page, I get the following error ...

[Error loading the layout] 
The file '/CMSVirtualFiles/Templates/AdHoc/<Site name>/96/96ad1ce9-3096-4a49-9a78-4201e2ffec81.ascx' does not exist.

The strange thing is that sometimes the folder (in this case 96) exists with a differently named file, and other times the folder doesn't exist at all. To me this looks like Kentico is trying to create a new .ascx file but can't for some reason. This is a complete assumption though ... I'm assuming when you clone a template a new .ascx file is created.

Has anyone had this issue before, or know what might be causing it?

Thanks in advance.

Correct Answer

Darryn Flood answered on January 9, 2018 03:19

Ok ... I think I have found the issue.

We are currently storing files in Azure Blob Storage, and our site was configured to store the "File System". So, every time we tried to clone a template, the files were being pushed to Azure (CMSVirtualFiles), but still trying to reference the files locally.

I changed our config so only Media Files are stored in Azure, and this fixed the issue.

I think we will go with the fix, but I would interested to know if there is a setting I'm missing that would make the original issue work?

Thanks.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Prashant Verma answered on January 8, 2018 07:26

Hi Darryn,

This error caused due to page template dose not exist/deleted from the system, can you make sure that page which you are create/copy associated with valid page template.

You can debug it using below action steps.

1.Create a new page template called "MyContent" and create a new page called "MyTestPage" with "MyContent".

2.Then copy "MyTestPage" with an option "Clone template as Ad-Hoc".

Thanks

2 votesVote for this answer Mark as a Correct answer

Darryn Flood answered on January 9, 2018 00:46

Thanks for you response.

I've had a look at Page Templates and templates appear to exist (at least it appears in the list of Page Templates).

When I try to create my own template, I get a very similar error ...

[Error loading the layout] 
The file '/CMSVirtualFiles/Templates/Shared/MyContent.ascx' does not exist.

Could this simply be a permissions issue? That is, when the CMS tries to create/copy files, it doesn't have the right permissions to perform this action?

Thanks again for your response.

0 votesVote for this answer Mark as a Correct answer

Prashant Verma answered on January 9, 2018 03:33

Oh is it, I'm thinking you are using local file system.

0 votesVote for this answer Mark as a Correct answer

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