Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Multifield DAM Asset Dialog #69

Open
tmastalirsch-tlv opened this issue Nov 27, 2024 · 3 comments
Open

Generic Multifield DAM Asset Dialog #69

tmastalirsch-tlv opened this issue Nov 27, 2024 · 3 comments

Comments

@tmastalirsch-tlv
Copy link

Hi guys,

it is there a possibility to use your multifield also within the meta data editor for asset dialog ?

@MichaelHeil
Copy link
Collaborator

Hello @tmastalirsch-tlv,

you could always try to apply a generic multifield via a metadata schema definition.
We would encourage you to test it out and give us feedback.

regards,
Mike

@tmastalirsch-tlv
Copy link
Author

Hello @MichaelHeil,

I add to the default AEM metadata schema definition by a video for example and added the field like in your description here in your repo

content xml under path --> /conf/global/settings/dam/adminui-extension/metadataschema/default/video
when i will open the dialog, you will see in the below image
Screenshot 2025-01-14 at 19 42 46

I get the following error messages

{
    "referer": "http://localhost:12100/mnt/overlay/dam/gui/content/assets/metadataeditor.external.html?item=/content/dam/Test.mp4&_charset_=utf-8",
    "path": "/mnt/overlay/dam/gui/content/assets/undefined/items/2_1736879587909",
    "parentLocation": "/mnt/overlay/dam/gui/content/assets/undefined/items",
    "location": "/mnt/overlay/dam/gui/content/assets/undefined/items/2_1736879587909",
    "status.message": "java.lang.UnsupportedOperationException: create 'undefined' at /mnt/overlay/dam/gui/content/assets",
    "title": "Error while processing /mnt/overlay/dam/gui/content/assets/undefined/items/2_1736879587909",
    "status.code": 500,
    "error": {
        "class": "java.lang.UnsupportedOperationException",
        "message": "create 'undefined' at /mnt/overlay/dam/gui/content/assets"
    },
    "changes": []
}

Can you help me ? :)

@tmastalirsch-tlv
Copy link
Author

tmastalirsch-tlv commented Jan 15, 2025

I have found out that the form in the meta data editor does not have “action” as an attribute but a “data-formid”.
This means that in your CUI.GenericMultifield.js in line 52
by this part:

this.crxPath = this.$element.parents("form").attr("action") ?? (this.$element.parents("form").attr("data-formid") + "/jcr:content");

You would have to add jcr:content to the crxPath in the asset editor.

Is it possible to implement this for the use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants