Creating new site using import cannot get added in the scope of page types

Manoranjan Maithani asked on November 21, 2021 18:40

I have created a export using one site.But when i import the exported file my site does not gets added to the scope of page types.Means when i try to click on adding new page type it says "Cannot create a new page in this section.Your administrator need to create a new page type or configure the "Allowed page types"..."I can manually add this newly created site to the scope of page types that are already present but i want this to do automatically when i create new site using the exported file.So what steps do i need to follow while exporting the site so that it gets added to the page types scope.

Thanks

Recent Answers


Juraj Ondrus answered on November 22, 2021 14:50

What version of Kentico are you using? Is the page type scope present in the source instance? If yes, what are the export and import settings? In other words, please provide full and detailed steps how to reproduce the issue.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on November 23, 2021 09:04

Are the page types part of the package?

0 votesVote for this answer Mark as a Correct answer

Manoranjan Maithani answered on December 10, 2021 06:50

Hi Juraj, Sorry for the late reply.I am using v12.0.95. And the export setting includes forms,page templates etc.But i saw that for adding page types i need to select it from global settings but that can override the page types. My question is when we create a new site using a web template then that new site can have pages that we selected while creating a web template.But when i try to create a new page in that new site it says cannot create page because i need to add page types to newly created site manually. So can i do this process automatically when i create web template so that we dont have to manually add new site to page types.

Thanks

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 10, 2021 09:10

In this case, you really need to assign the page types manually to the site (or vice versa, assign the new site to the existing page types). To automate this, I would try using global event handler and use the import/export events and then use the API to assign given site to given object - you will need to update the DataClassInfo object of the page type and add the new site.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on December 10, 2021 09:27

Since the setup of a new site also has some technical side (dns, licenses, users...) we tend to do it manually.

But did you know you can assign objects to a site in bulk? As going into each individual object can take a lot of time. But using the Bulk assigner in the Site application this could be done within minutes. You can do custom tables, search indexes, smtp server, modules, users, page types and relationship names

image

So not automatic, but relatively quick and gives you more control.

0 votesVote for this answer Mark as a Correct answer

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