collective / collective.nitf

A Dexterity-based content type inspired on the News Industry Text Format specification
8 stars 3 forks source link

There's no upgradeStep for adding the collective.nitf tile if you're upgrading from 1.x to 2.x. #205

Closed idgserpro closed 7 years ago

idgserpro commented 7 years ago

In https://github.com/collective/collective.nitf/tree/1.0b10/src/collective/nitf there wasn't a collective.nitf tile, added in https://github.com/collective/collective.nitf/blob/2.0a1/src/collective/nitf/tiles/nitf.pt, but there isn't an upgradeStep that adds this tile when you're upgrading from these major versions.

We suggest a fix in https://github.com/collective/collective.nitf/blob/master/src/collective/nitf/upgrades/v2000/profile/registry.xml, adding the same as https://github.com/collective/collective.nitf/blob/2.1b2/src/collective/nitf/profiles/default/registry.xml#L79 since there's no harm in adding an empty record like this if the user is not using plone.app.tiles.

 <record name="plone.app.tiles">
    <field type="plone.registry.field.List">
      <title>Tiles</title>
      <value_type type="plone.registry.field.TextLine" />
    </field>
    <value purge="false">
      <element>collective.nitf</element>
    </value>
  </record>
hvelarde commented 7 years ago

I think that has to be manually added in the upgrade step to 2001 instead; seems easier and is the right place to put it.

idgserpro commented 7 years ago

We thought about 2000 because, in theory, this fix should be in the first available upgradeStep for 2.x branch (since the tile was added in 2.0a1), but if you think it's better to put in 2001 that's ok.

hvelarde commented 7 years ago

sorry, I though the tile was added later; feel free to add it in 2000 then.