[MGNLCT-156] M6 contentTypes can reference M5 contentTypes Created: 27/Jul/20  Updated: 29/Sep/20  Resolved: 07/Sep/20

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Major
Reporter: Christopher Zimmermann Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLUI-5350 Cut number of columns visible in choo... Closed
relation
is related to MGNLUI-6044 LinkField to M5 app not working in de... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

As a developer I want my M6 contentTypes-based app to reference M5 contentTypes-based apps so that I can benefit from contentTypes easy usage when I am linking to apps that have not been upgraded to M6.

Developers will want to use the new framework and upgrade their apps to M6. Also internally at Magnolia we want to upgrade demo projects to M6. However these apps often need to link to M5 contentTypes, such as those shipped by Magnolia like 'Categories' and 'Stories', or those shipped in other modules, that the developer does not have control over.

If M6 contentTypes do not support linking to m5 contentTypes, then developers need to resort to the "inline decoration' feature in the app definition to supply the linkField by hand. Doing this makes contentTypes harder to use and understand and makes demos more complicated and less convincing.



 Comments   
Comment by Christopher Zimmermann [ 30/Jul/20 ]

Maybe easier now that this is done: MGNLUI-6044

Comment by Christopher Zimmermann [ 30/Jul/20 ]

I was able to decorate the app definition created by the contentType with a  "reference: categoires" property like this:

(Note the usage of !override to get rid of the ContentTypeAppAwareWorkbenchChooserDefinition which was autogenerated by CT, but appeared to cause the thing not to work..Not 100% sure its necessary.)

 

subApps:
  detail:
    form:
      properties:        
        link2:
          chooser:
            workbenchChooser: !override
              appName: categories
              #class: info.magnolia.ui.contenttype.chooser.ContentTypeAppAwareWorkbenchChooserDefinition

Comment by Christopher Zimmermann [ 07/Sep/20 ]

Closing as outdated.
I've confirmed that this is now working on 6.2.3-snapshot. 

Checked like this:

  • Create an m5 app. For example by using !content-type-m5.
  • Link to some content from an M5 app (like the categories app)
  • Change the app to an m6 app.
  • Confim that the previously created item still has the working link.
  • Create additional links now from the m6 app to the m5 app.
  • Works.

This means that we do not need to document that it's not supported either.

 

This ticket was outdated (fixed) by the change described here:

https://jira.magnolia-cms.com/browse/MGNLUI-5350?focusedCommentId=227028&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-227028

 

Generated at Mon Feb 12 00:37:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.