Scroll ImageMap Macros don't show on the Confluence Page and/or in an Export
Symptom
When viewing a Confluence page the Scroll ImageMap macro content does not display. However, within the edit mode for the Confluence page the image content displays as expected. Furthermore, when exporting the affected page (with Scroll PDF Exporter / Scroll Word Exporter) the Scroll ImageMap content is not included and the following message is included:
Cause
The Scroll ImageMap macro does not have the correct image dimensions set.
We are aware that this problem can occur with older Scroll ImageMap macros. Specifically, when a Scroll ImageMap macro was created in an app version prior to Scroll ImageMap v2.0, these older macros were automatically migrated to a new data format when Scroll ImageMap v2.0 or later was used in Confluence. The migration to the newer data format in some cases affected the image dimensions.
Within the Page History (accessible via the Page tools menu •••) it is possible to check if your Scroll ImageMap macros were migrated to the new data format.
Resolution
- For a single affected Scroll ImageMap macro it is possible to open the affected Scroll ImageMap macro in the Confluence editor, and then simply re-save it again. This will apply the correct image dimensions.
- For a space / spaces that contain multiple affected Scroll ImageMap macros we have created a tool that you can run that will automatically fix Scroll ImageMap macros that are missing width and height dimensions after migration.
Using the Scroll ImageMap Image Dimension Fixing Tool
If you are unsure if your Scroll ImageMap macros are affected by this specific issue please reach out to help@k15t.com and we can confirm this with you within a support ticket.
Prerequisites
The following requirements must be met in order to run the tool:
- The user must be a Confluence Administrator.
- curl tool should be installed. However, any other alternative can also be used.
About the Tool
The following tool will apply correct image dimensions to Scroll ImageMap macros which include the following problematic storage format examples (see below). The storage format examples are the problematic parts leading to the images not showing in Confluence. The Scroll ImageMap Image Dimension Fixing Tool only fixes Scroll ImageMap macros where the meta parameter contains "missingImgDimensions":true
<ac:parameter ac:name="viewSize">0.0</ac:parameter>
<ac:parameter ac:name="imgWidth">0.0</ac:parameter>
<ac:parameter ac:name="meta">{"missingImgDimensions":true}</ac:parameter>
<ac:parameter ac:name="imgHeight">0.0</ac:parameter>
Running the Tool
The command to start the tool is formed as follows:
curl -u {userName}:{password} -X POST -H 'Content-Type: application/json' {baseUrl}rest/k15t-scroll-imagemap/1.0/admin/fixtool/missing-dimensions/{spaceKey}
Example
curl -u admin:admin -X POST -H 'Content-Type: application/json' http://localhost:1991/rest/k15t-scroll-imagemap/1.0/admin/fixtool/missing-dimensions/TEST
The command should be executed in the terminal (with preinstalled curl) or with another similar tool. The tool returns an id of the task that was started. For example: d944acee-8f2c-4298-be3c-8c3e367ffed7
Checking the Success of the Tool
The result of the fixing tool can be called up in the browser with the following command:
{baseUrl}/rest/k15t-scroll-imagemap/1.0/admin/migration/task
Example: One page with the pageId 1050026 in the space with the spaceKeyTEST was successfully migrated:
[
{
"status": "DONE",
"id": "d944acee-8f2c-4298-be3c-8c3e367ffed7",
"created": "2022-10-25T14:43:25.931+02:00",
"result": "{\"status\":\"MIGRATED\",\"limitedToSpace\":\"TEST\",\"pageMigrationResults\":[{\"pageId\":1050026,\"status\":\"MIGRATED\",\"message\":\"\"}]}"
},
{
"status": "DONE",
"id": "1d836492-12ce-4666-b8f6-151688f249bc",
"created": "2022-10-25T14:41:09.061+02:00",
"result": "{\"status\":\"NO_NEED\",\"limitedToSpace\":\"test\",\"pageMigrationResults\":[]}"
}
]
After running the tool, the affected Scroll ImageMap macros will appear in the Confluence page view. Additionally, the following comment will be added to the Page History: