Hi peeps, I have a strange issue with registering a profile as a dependency in my package.
I have the following profiles registered in my package:
The two profiles which are causing the issue are the following:
In the metadata.xml
file of my default profile I have the following entered:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>1000</version>
<dependencies>
<dependency>profile-my.webapp:contenttypes</dependency>
<dependency>profile-plone.app.theming:default</dependency>
<dependency>profile-plonetheme.barceloneta:registerless</dependency>
</dependencies>
</metadata>
The thing to note here is the <dependency>profile-my.webapp:contenttypes</dependency>
line. I set the contenttypes profile as a dependency of my default profile.
Here is the registration for these two profiles in my configure.zcml
:
<genericsetup:registerProfile
name="contenttypes"
title="My Webapp (contenttypes)"
directory="profiles/contenttypes"
description="Installs the my.webapp Content-Types."
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
<genericsetup:registerProfile
name="default"
title="My Webapp"
directory="profiles/default"
description="Installs the my.webapp add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
post_handler=".setuphandlers.post_install"
/>
The Issue
When I install the default profile (that has the contenttypes profile as a dependency), then the quickinstaller shows that I have the "My Webapp (contenttypes)" package installed. When I try to reinstall the package, it reinstalls from the contenttypes package and not the default package. Why is this, and do you guys have any idea how to fix this..?
Expected Result
I create a custom profile
it is called contenttypes
I set it as a dependency in my default profile
I install the default profile
and then I navigate to the quickinstaller
I should see the title of my default profile
and if I reinstall the package, it should reinstall the default profile
Current Result
I create a custom profile
it is called contenttypes
I set it as a dependency in my default profile
I install the default profile
and then I navigate to the quickinstaller
I see the title of the contenttypes profile
and if I reinstall the package, it imports the contenttypes profile
Any help would be greatly appreciated! I've taken a look at the documentation for registering multiple profiles, but it does not explain this behaviour...