When I change the profile version for an add-on that I wrote I always get the message above.
This add-on has been upgraded. Old profile version was 10. New profile version is 11. There is no upgrade procedure defined for this add-on. Please consult the add-on documentation for upgrade information, or contact the add-on author.
So how I can define a procedure to upgrade an add-one?
in your configure.zcml (or preferably in a separated upgrades.zcml included in configure.zcml), you need to declare your upgrade step like that:
<genericsetup:upgradeStep
source="22"
destination="23"
title="Remove such js from registry"
description=""
profile="Products.MyProduct:default"
handler=".upgrades.upgrade_22_to_23"
/>
and you need a upgrades.py file to implement the upgrade step (just an example):
from Products.CMFCore.utils import getToolByName
def upgrade_22_to_23(context):
js_id = '++resource++blabla/blibli.js'
jsregistry = getToolByName(context, 'portal_javascripts')
jsregistry.unregisterResource(js_id)
Note: in zcml, source might be set to '*' if you want the step to apply from any previous profile version to the one you target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With