Repository: plone/Products.CMFPlone

Issue:
Site Creation Volto creates Folder-type content
## BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

<!--

Read https://plone.org/support/bugs first!

Please use the labels at Github, at least one of the types: bug, regression, question, enhancement.

Please include tracebacks, screenshots, code of debugging sessions or code that reproduces the issue if possible.
The best reproductions are in plain Plone installations without addons or at least with minimal needed addons installed.

-->

### What I did:

I created a Volto Site.

### What I expect to happen:

That contents of the Folder type are not created, since the Folders were removed in Volto.

### What actually happened:

Initial contents, News, Events and Users are created as Folder.

When I navigate in Volto and click on one of these items in the menu, I get the error in javascript console:

```
GET https://localhost/++api++/Members/@types/Folder 401
```

This seems to be done in:

https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/setuphandlers.py

### What version of Plone/ Addons I am using:

Plone 6.0b1




Discussion:
This sounds like the kind of thing we want to get right before a final release, so could be called a blocker.
I confirm it on https://6.demo.plone.org/Members but only for the Members folder, not for News or Events.
The site seems to work fine though. Can you tell me what goes wrong because of this?
It works, but I find it strange to keep giving an error when browsing the site.

I also find it strange for the installation to create a content type that can no longer be created.

Also note that the contents are not useful for anything. Inside the news and events folder, Collections are created. Collections are not used in Volto. You cannot create a Collection type in Volto. So you don't see the search, which is done in Classic Plone. The Members folder, in Classic, has a view that serves to search for users. This view does not work in the Volto.

I keep asking myself what content should be created in Volto. Perhaps none?
Well actually the Collection works. But if you try to edit it, nothing is shown.
For Volto instead of collections we can create a page with a listing block that does the same queries that were previously done using collections. Or, we can just remove those pages if we don't think they are valuable as default content.

Resolving patch:
diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py
--- a/Products/CMFPlone/browser/admin.py
+++ b/Products/CMFPlone/browser/admin.py
@@ -160,10 +160,8 @@ class AddPloneSite(BrowserView):
     # Let's have a separate list for Volto.
     volto_default_extension_profiles = (
         'plone.app.caching:default',
-        # We could choose to not install Barceloneta:
         'plonetheme.barceloneta:default',
         'plone.volto:default',
-        'plone.volto:default-homepage'
     )
 
     def profiles(self):
@@ -294,6 +292,7 @@ def __call__(self):
             else:
                 # we have a keymanager, check csrf protection manually now
                 checkCSRF(self.request)
+
             site = addPloneSite(
                 context, site_id,
                 title=form.get('title', ''),
diff --git a/Products/CMFPlone/factory.py b/Products/CMFPlone/factory.py
--- a/Products/CMFPlone/factory.py
+++ b/Products/CMFPlone/factory.py
@@ -117,7 +117,7 @@ def zmi_constructor(context):
 
 def addPloneSite(context, site_id, title='Plone site', description='',
                  profile_id=_DEFAULT_PROFILE,
-                 content_profile_id=_CONTENT_PROFILE, snapshot=False,
+                 content_profile_id=None, snapshot=False,
                  extension_ids=(), setup_content=True,
                  default_language='en', portal_timezone='UTC'):
     """Add a PloneSite to the context."""
@@ -154,7 +154,20 @@ def addPloneSite(context, site_id, title='Plone site', description='',
 
         # Install default content types profile if user do not select "example content"
         # during site creation.
-        content_types_profile = content_profile_id if setup_content else _TYPES_PROFILE
+        content_types_profile = (
+            content_profile_id
+            if setup_content and content_profile_id
+            else _TYPES_PROFILE
+        )
+        if setup_content:
+            if content_profile_id:
+                content_types_profile = content_profile_id
+            elif "plone.volto:default" in extension_ids:
+                content_types_profile = "plone.volto:default-homepage"
+            else:
+                content_types_profile = _CONTENT_PROFILE
+        else:
+            content_types_profile = _TYPES_PROFILE
 
         setup_tool.runAllImportStepsFromProfile(f'profile-{content_types_profile}')
 


Test patch: