Include code macro: $myHelper.convertStorageToView( $code )

Issue #110 on hold
Former user created an issue

Hi, i am trying to use the include code macro on my Confluence instance. Confluece has application link connected with BitBucket.

When i am adding some URL (raw text in BitBucket) i have preview:

$myHelper.convertStorageToView( $code )

see screenshot 1.

I would like to see somethnig like in 2.

Why i dont see normal code in include code macro?

Comments (9)

  1. Scott Selberg

    I’m sorry, I’m really not understanding the problem of what you have and what you want. Can you add some more detail?

  2. Kasia Olchawa

    Hi, i have gor a source code in BB (text). I would like to present it on Confluence page. This is for presenting code which is important or re-usable in many case.

    I am adding include code macro on Confluence page and it not works.

  3. Scott Selberg

    Here’s what I’ve received from you.

    • You have code in bitbucket.
    • You want to use the IncludeCode macro to display the code in Confluence.
    • It doesn’t work.

    I can’t offer any help without more information. I’m not sure if you are entering or seeing “$myHelper.converStorageToView($code)” somewhere. I have no idea what if any error codes are present. I have no idea if there is any authentication or proxy issues. So I just don’t know how to help.

  4. Kasia Olchawa

    Storage format:

    <p><ac:structured-macro ac:name="code-include" ac:schema-version="1" ac:macro-id="7d06d7e7-15da-4bec-abbd-fbd83e5564ac"><ac:parameter ac:name="password">XXXXXXXXX</ac:parameter><ac:parameter ac:name="language">bash</ac:parameter><ac:parameter ac:name="url">https://bitbucket.mbank.pl/projects/GIT/repos/nit---skrypty/raw/Unix/scripts/LODZFS069/opt/bash/clean_gitlab_backup.sh?at=refs%2Fheads%2Fmaster</ac:parameter><ac:parameter ac:name="username">ZEW_2_11292</ac:parameter></ac:structured-macro></p>
    

    What i would like to show:

    What i have:

    I have got applink:

    Calalina.out is empty (no errors from macro).

    Why Yours macro is not working?

  5. Scott Selberg

    What version of Confluence are you using? It looks like the line “$myHelper.convertStorageToView($code)” is being escaped and rendered as HTML rather than being executed.

  6. Sylvain ORSET

    Hi,

    I reproduce the same issue when I want to use the “Include code” macro on my local Confluence instance running version 7.13.8. $myHelper.convertStorageToView($code) is printed instead of the code block I want to include. It was working initially and it looks like it got broken (because of a Confluence upgrade ?) between September 2021 and March 2022.

    Would you have any hints to investigate the issue ?

    Thanks in advance !

  7. Log in to comment