Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the name of the profile blocks to volto-blocks #1023

Closed
wants to merge 1 commit into from

Conversation

wesleybl
Copy link
Member

@wesleybl wesleybl commented Nov 12, 2020

Change the name of the profile blocks to volto-blocks, so that the install profile of Plone 4.3 is the default profile.

In Plone 4.3, the default profile must be first in alphabetical order.

I tested it on a portal already had the blocks profile installed and everything went well.

Fix #895

@mister-roboto
Copy link

@wesleybl thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

@wesleybl wesleybl changed the title Change the name of the profile blocks to volto-block, so that the Change the name of the profile blocks to volto-block Nov 12, 2020
@wesleybl
Copy link
Member Author

@jenkins-plone-org please run jobs

news/895.bugfix Outdated Show resolved Hide resolved
@sneridagh
Copy link
Member

Can you state why? I don't get the change. Also it will break a lot of projects that rely on it to be named exactly like it.

@wesleybl wesleybl changed the title Change the name of the profile blocks to volto-block Change the name of the profile blocks to volto-blocks Nov 12, 2020
install profile of Plone 4.3 is the default profile

In Plone 4.3, the default profile must be first in alphabetical order.
@mauritsvanrees
Copy link
Sponsor Member

Can you state why? I don't get the change. Also it will break a lot of projects that rely on it to be named exactly like it.

This solves #895
It is because of these lines in the quick installer. When installing plone.restapi it takes all extension profiles, sorts them alphabetically, and picks the first one as the install profile. Without this PR, it picks blocks over default. So in Plone 4.3, in the prefs_install_products_form you do not see plone.restapi, but you see "Volto Blocks" in the list of modules.

In Plone 5 the quick installer tool is less and less involved, so it may work fine there, probably already in 5.0.

@tisto
Copy link
Sponsor Member

tisto commented Nov 12, 2020

FYI: I do not plan to merge this anytime soon. This has the potential to break lots of existing Volto projects.

@wesleybl
Copy link
Member Author

@tisto maybe break packages in the situation described by @avoinea : #895 (comment)

But the packages could be updated.

@mauritsvanrees
Copy link
Sponsor Member

I was going to say "LGTM", but now I am wondering who would be responsible for applying the blocks or volto-blocks profile. I had expected that the default profile would depend on this one, but I see it is the other way around. (You can see I don't know much about the structure of plone.restapi.) In other words, there is probably documentation somewhere that tells people to add plone.restapi:blocks to their metadata.xml. This documentation will be wrong when this PR is merged, and people would have to change their code.

Traditional workaround is to add an old-style Extensions/install.py containing an install function that explicitly installs the default profile. The quickinstaller tool first tries this function before picking a profile.

@wesleybl
Copy link
Member Author

In other words, there is probably documentation somewhere that tells people to add plone.restapi:blocks to their metadata.xml.

@mauritsvanrees I searched for documentation on this profile and didn't find it.

Traditional workaround is to add an old-style Extensions/install.py containing an install function that explicitly installs the default profile. The quickinstaller tool first tries this function before picking a profile.

I will take a look at this.

Another alternative that I thought is to keep both profiles and put a zcml condition on them.

@wesleybl
Copy link
Member Author

Traditional workaround is to add an old-style Extensions/install.py containing an install function that explicitly installs the default profile.

@mauritsvanrees the default profile is installed in Plone 4.3 when profile blocks are installed: See:

<dependency>profile-plone.restapi:default</dependency>

The problem is that profile blocks should not be installed.

@tisto we have already changed the name of this profile before:

28cd92e#diff-397c7ccf64bf715e69e564921ae40d23dd2f2de0a221cf04bb368e977f6c1152L49

@tisto
Copy link
Sponsor Member

tisto commented Nov 12, 2020

@wesleybl this is not an issue that is open for discussion and I made my point clear multiple times already. The name change was a big thing back then and I guess back then we were the only company that relied on this, so we could do this move. Today we have lots of projects and multiple companies that rely on this profile and naming. As the maintainer of this package, I am not going to break things without careful consideration and planning.

@wesleybl wesleybl closed this May 13, 2021
@wesleybl wesleybl deleted the rename_blocks_profile branch May 13, 2021 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plone.restapi 6.4.1 shows "Volto Blocks" installer in add-on products controlpanel
5 participants