Main Content

Magnolia Community Forums: Get help with Magnolia: Linking to files in /.resources/ doesn't work in CKeditor


  • jarkko.mantysaari
    jarkko.mantysaari
    Full name: Jarkko Mantysaari
    Posts: 2
    Last post: Dec 14, 2016 2:59:17 PM
    Linking to files in /.resources/ doesn't work in CKeditor
    #1 by jarkko.mantysaari on Dec 14, 2016 2:56:21 PM

    We have a build process that creates downloadable assets into a light module's webresources directory. When we try to link to these in the admincentral's CKeditor, the links break after saving the dialog. This happens on Magnolia 5.4.9 and 5.5. We haven't been able to reproduce this in the public Magnolia demo.

    When we try to save this:
    <a href="/.resources/our-ui-module/webresources/assets/icons/icons.svg">

    It turns into this:
    <a href="/">

    When the link is rendered, it becomes localhost:8080/fallback. Any idea what could be wrong?

    Below are our component files.


    templateScript: /our-ui-module/templates/components/textbox/textbox.ftl
    renderType: freemarker
    title: Text
    dialog: our-ui-module:components/textbox



    <div class="textbox">
    [#if content.body?has_content]
    ${cmsfn.decode(content).body}
    [/#if]
    </div>



    form:
    tabs:
    - name: tabText
    label: Content
    fields:
    - name: body
    class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition
    label: Content body
    configJsFile: /.resources/our-ui-module/webresources/assets/js/ckeditor/default.js
    i18n: true

    actions:
    commit:
    class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
    cancel:
    class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition

  • jarkko.mantysaari
    jarkko.mantysaari
    Full name: Jarkko Mantysaari
    Posts: 2
    Last post: Dec 14, 2016 2:59:17 PM
    Re: Linking to files in /.resources/ doesn't work in CKeditor
    #2 by jarkko.mantysaari on Dec 14, 2016 2:59:17 PM

    The broken result got removed from the message for some reason. It turns the link into this (remove the whitespace after the $ sign):

    $ {link:{uuid:{cafebabe-cafe-babe-cafe-babecafebabe},repository:{website},path:{/},nodeData:{},extension:{resources/pride-ui-module/webresources/assets/icons/svg.svg}}}

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/