enonic / cms2xp

Enonic CMS to XP migration tool
0 stars 0 forks source link

Parts are generated out of XSLT-files - how does multi-use function? #30

Closed Bellfalasch closed 6 years ago

Bellfalasch commented 6 years ago

We seem to have issues sometimes with parts being created out of XSLT-files that are used in multiple portlets. Common CMS practise was to have maybe 1 XLST-file that was use in -let's say - 20 different portlets. The difference being the config. In XP world this would be 1 Part, used in 20 different scenarios (different config). Is this at all taken into account in migration? We have indications suggesting it is not.

Ideally the parts would not be created into many different ones, but into only one.

hjelmevold commented 6 years ago

Example from NAV CMS installation:

Portlet based on the following XSLT file: /beta.nav.no/modules/velg-skjema.xsl …is used by all of these portlets:

This XSLT file contains 3 params of type page, and every portlet in the list above has different menuitems added to these params. See for example the portlet "Skjema 3: Velg skjema (AAP)" which has been added to the custom Page Configuration on this menuitem: /no/Person/Skjemaer-for-privatpersoner/Skjemaer/Arbeid, helse og sykdom/arbeidsavklaringspenger/Arbeidsavklaringspenger

sigdestad commented 6 years ago

Just create a "view/" folder, and place the new template there. Then create a velg-skjema.js in the lib/ folder. this js will use the view template. For each part, simply require the velg-skjema.js and kick off the functions in the shared js file (maybe even using parameters)

Bellfalasch commented 6 years ago

@sigdestad The problem we're describing here is basically #32 - that after migration, are not migrated to XP. These contain very important data and configuration for Portlets.These are lost in the migration process (in XP the Parts comes out without any config).

This issue is probably a bit "messy", but it is about doing extra research in CMS2XP code how these XSLT-files are handled. Just to make sure nothing else have sneaked in there too (other then what is outlined in #32) since this was common praxis in CMS (use one XSLT in multiple Portlets, just changing params).

aro commented 6 years ago

This might have been fixed in #32. Basically the portlet parameters were not converted at all in the generated parts.

Bellfalasch commented 6 years ago

@hjelmevold - This one looks to work as intended now right?