[CELUM-42] Cannot add component to page when using celumLinkField Created: 13/May/22 Updated: 13/Jul/22 Resolved: 13/Jul/22 |
|
| Status: | Closed |
| Project: | Celum DAM Connector |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.3 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Christopher Chard | Assignee: | Raphael Falvo |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
Components cannot be added when using celumLinkField. The added component doesnt show up in the page and also no jcr node is created. I think this is due to a page reload that occurs "in the background" of the dialog while in celumLinkField picker. Everytime I doubleclick a Celum Folder, the current page in the Magnolia page detail app reloads. This seems to make the component dialog lose its context or something. i show the behavior in this video: https://share.icloud.com/photos/039P4_zRn08ptG2F_h0M3OJOQ |
| Comments |
| Comment by Raphael Falvo [ 13/May/22 ] |
|
Hey cchard , Thanks for the detailed information. Unfortunately I'm not able to reproduce the issue on my side. May you please share the form definition where you are using the CelumLink ? |
| Comment by Christopher Chard [ 13/May/22 ] |
|
Sure, however quite a few includes involved to get to the dialog definition of the link component, so you need to bear with me: ui-module-templating/includes/dialogs/link-field/dam.yaml $type: celumLinkField buttonSelectNewLabel: ui-field-definitions.ui-link-field-dam.buttonSelectNewLabel buttonSelectOtherLabel: ui-field-definitions.ui-link-field-dam.buttonSelectOtherLabel textInputAllowed: true showOptions: false pageLength: 10 ui-module-templating/includes/dialogs/link-src-field.yaml
#linkSrc:
$type: switchableField
label: dialog-snippets.link-fields.linkSrc
field:
$type: comboBoxField
defaultValue: internal
datasource:
$type: optionListDatasource
options:
- name: internal
value: internal
label: dialog-snippets.link-fields.linkSrc.internal
- name: assets
value: assets
label: dialog-snippets.link-fields.linkSrc.assets
- name: external
value: external
label: dialog-snippets.link-fields.linkSrc.external
itemProvider:
$type: jcrChildNodeProvider
forms:
- name: internal
properties:
linkSrcInternal: !include:/ui-module-templating/includes/dialogs/link-field/pages-and-anchor.yaml
label: dialog-snippets.link-fields.linkSrc.forms.linkSrcInternal
required: true
- name: assets
properties:
linkSrcAssets: !include:/ui-module-templating/includes/dialogs/link-field/dam.yaml
label: dialog-snippets.link-fields.linkSrc.forms.linkSrcAssets
required: true
- name: external
properties:
linkSrcExternal: !include:/ui-module-templating/includes/dialogs/link-field/external.yaml
ui-module-templating/includes/dialogs/link-snippet.yaml linkSrc: !include:/ui-module-templating/includes/dialogs/link-src-field.yaml linkTitle: !include:/ui-module-templating/includes/dialogs/link-title-field.yaml linkTarget: !include:/ui-module-templating/includes/dialogs/link-target-field.yaml linkStyle: !include:/ui-module-templating/includes/dialogs/link-style-field.yaml linkIconOption: !include:/ui-module-templating/includes/dialogs/system-icons-autotype-snippet.yaml ui-module-templating/dialogs/components/union-investment/link.yaml label: link wide: true form: properties: !include:/ui-module-templating/includes/dialogs/link-snippet.yaml linkAlignment: !include:/ui-module-templating/includes/dialogs/select-field.yaml label: link.linkAlignment textInputAllowed: false scrollToSelectedItem: false defaultValue: left datasource: $type: optionListDatasource options: - value: left label: link.linkAlignment.left - value: right label: link.linkAlignment.right footerLayout: !include:/ui-module-templating/includes/dialogs/footer-layout.yaml |
| Comment by Christopher Chard [ 13/May/22 ] |
|
But no need to think so complex. We have another component that uses ui-module-templating/includes/dialogs/link-field/dam.yaml directly without the other includes. Same behaviour. It breaks as soon as you click on a celum folder or double-click the "up"-row |
| Comment by Raphael Falvo [ 13/May/22 ] |
|
cchard |
| Comment by Christopher Chard [ 13/May/22 ] |
label: download-list-item
form:
properties:
title:
!include:/ui-module-templating/includes/dialogs/text-field.yaml
label: common.title
required: true
description:
!include:/ui-module-templating/includes/dialogs/text-area-field.yaml
label: common.description
date:
!include:/ui-module-templating/includes/dialogs/date-field.yaml
label: common.date
downloadSrc:
!include:/ui-module-templating/includes/dialogs/link-field/dam.yaml
label: download-list-item.downloadSrc
required: true
footerLayout: !include:/ui-module-templating/includes/dialogs/footer-layout.yaml
|
| Comment by Raphael Falvo [ 08/Jun/22 ] |
|
Hello cchard, This issue has been fixed in celum-dam-connector-1.0.3-beta7. Please have a look and let us know if it works on your side. |
| Comment by Christopher Chard [ 08/Jun/22 ] |
|
Hello rfalvo, |
| Comment by Raphael Falvo [ 10/Jun/22 ] |
|
Hello cchard , That's good news for the other tickets ! It was a very small piece of code which was triggering the UI refresh, and somehow loosing the context and inserting the data in JCR at the wrong place or even not at all. |