PiranhaCMS / piranha.core

Piranha CMS is the friendly editor-focused CMS for .NET that can be used both as an integrated CMS or as a headless API.

Home Page:http://piranhacms.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regions in my SiteContent don't show up in the settings editors

hadrian625 opened this issue · comments

I have a SiteContent customized with a couple of regions.
For the main site I already have created they are showing up in editor
image

But if I try to add a new site, those regions are not showing up at all in editor.
image

If I first access the default site that is showing those regions, then add a new site the regions are showing up, but they are filled in with the data from the default site. After saving the site and going back to edit it, those regions are gone again and I see a 404 error for endpoint on "/manager/api/site/content/<SITE_GUID_HERE>". Also in console there is logged the text "No HTML editor registered." and "Setting regions to empty array"

I hope I added enough information.
We are in the process of using multiple sites with our CMS to hold separate content for different tenants.

On further investigation I found by looking in database that all sites I create with 'Add Site' button have their 'SiteTypeId' set to null and not to my custom sitetype.
Most probably this is the cause of this issue. So the question is now why the 'SiteTypeId' is set to null for newly created sites and not having the same site type id as the default site I already have

Hi there! All newly created sites default to not having a content type selected. The reason for this is that you could very well have different content types for different sites. After creating a new site you need to:

  1. Edit the site
  2. Select the desired site type
  3. Save the site
  4. Close and re-open the site in edit mode

Regards

Hi,
Thanks for the quick reply.
But I can't see a way to change the site type at edit time. I can only see this:
image

What am I missing?
My custom site is as according to the documentation. A class that derives from SiteContent with class attribute [SiteType]

Found how I can change the type of the site. It was the field 'Content type' in UI. Closing the issue as it is no longer valid