欢迎来到冠富研究院!
当前位置:首页 > 帮助文档 > 恢复在 Confluence Cloud 中移动到另一个页面的图表 内容

恢复在 Confluence Cloud 中移动到另一个页面的图表

选择字号: 超大 标准 发布时间:2022-08-10 21:51 | 作者:admin

恢复在 Confluence Cloud 中移动到另一个页面的图表

当 draw.io 图表附件被移动到另一个页面时,您可能会看到显示原始 draw.io 宏的错误。这种情况很少发生,但图表可以恢复,因为没有数据丢失。

要在页面上显示 draw.io 图表,draw.io 宏包含一个属性,该属性指定附加到页面的图表名称(如链接)。当您将附件移动到另一个页面时,该链接会丢失,并且 draw.io 宏无法找到图表。

查找移动的图表文件的名称

  1. 首先确定图表附件的名称。作为管理员,请查看页面源代码——Confluence 用来描述页面的底层格式。单击右上角的…> 查看存储格式以查看页面的来源。
    点击 ... > View Storage Format 以管理员身份查看 Confluence Cloud 中某个页面的来源
  2. 在源代码中,查找structured-macro名称为“drawio”的。
  3. 在 this 宏定义中,查找diagramName参数。在下面的示例中,图表名称是标尺-measurements.drawio 。
<p><ac:structured-macro ac:name="drawio" ac:schema-version="1"
data-layout="default" ac:macro-id="41ddd3f1-9613-4f13-b0f1-9b24b68db2eb">
<ac:parameter ac:name="contentId">678821920</ac:parameter><ac:parameter
ac:name="simple">0</ac:parameter><ac:parameter ac:name="zoom">1</ac:parameter>
<ac:parameter ac:name="inComment">0</ac:parameter><ac:parameter
ac:name="pageId">678854685</ac:parameter><ac:parameter
ac:name="diagramDisplayName">rulers-measurements.drawio</ac:parameter>
<ac:parameter ac:name="lbox">1</ac:parameter><ac:parameter
ac:name="contentVer">1</ac:parameter><ac:parameter
ac:name="revision">1</ac:parameter><ac:parameter
ac:name="baseUrl">http://drawio.atlassian.net/wiki</ac:parameter>
<ac:parameter ac:name="diagramName">rulers-measurements.drawio</ac:parameter>
<ac:parameter ac:name="width">1151</ac:parameter><ac:parameter
ac:name="links" /><ac:parameter ac:name="tbstyle" /><ac:parameter
ac:name="height">911</ac:parameter></ac:structured-macro></p>

搜索图表文件并恢复它

  1. 复制图表名称并将其输入到 Confluence 的搜索功能中。
    提示:将搜索结果限制为Attachments
    将搜索结果过滤到附件以查找移动的图表文件
  2. 如果revision参数为1,您只需将图表附件复制回原始页面即可修复 draw.io 宏的问题。
  3. 如果revision参数更高:
    • 将附件从错误页面下载到您的设备。
    • 编辑原始页面并删除旧宏。
    • 插入一个新的 draw.io 图表宏。
    • 在图表编辑器中,将之前保存的文件拖放到绘图画布上。
    • 保存图表,并保存 Confluence 页面。

对损坏的页面上的每个 draw.io 图表宏重复这些步骤。

提示:如果您的浏览器或 Confluence Cloud 实例出现阻止图表/页面发布的问题,您也可以从附加到页面的文件中恢复图表。.tmp

 

Recover a diagram that was moved to another page in Confluence Cloud

When a draw.io diagram attachment has been moved to another page, you may see an error where the original draw.io macro is displayed. This happens very rarely, but the diagram can be recovered because no data has been lost.

To display a draw.io diagram on a page, the draw.io macro contains an attribute that specifies a diagram name that is attached to a page (like a link). When you move an attachment to another page, that link is lost, and the draw.io macro can’t find the diagram.

Find the name of the moved diagram file

  1. Determine the name of the diagram attachment first. As an administrator, look at the page source - the underlying format that Confluence uses to describe the page. Click on … > View Storage Format in the top right to see a page’s source.
    Click on ... > View Storage Format to see the source of a page in Confluence Cloud as an administrator
  2. Within the source, look for the structured-macro with the name “drawio”.
  3. Within the this macro definition, look for the diagramName parameter. In the following example, the diagramName is rulers-measurements.drawio.
<p><ac:structured-macro ac:name="drawio" ac:schema-version="1"
data-layout="default" ac:macro-id="41ddd3f1-9613-4f13-b0f1-9b24b68db2eb">
<ac:parameter ac:name="contentId">678821920</ac:parameter><ac:parameter
ac:name="simple">0</ac:parameter><ac:parameter ac:name="zoom">1</ac:parameter>
<ac:parameter ac:name="inComment">0</ac:parameter><ac:parameter
ac:name="pageId">678854685</ac:parameter><ac:parameter
ac:name="diagramDisplayName">rulers-measurements.drawio</ac:parameter>
<ac:parameter ac:name="lbox">1</ac:parameter><ac:parameter
ac:name="contentVer">1</ac:parameter><ac:parameter
ac:name="revision">1</ac:parameter><ac:parameter
ac:name="baseUrl">http://drawio.atlassian.net/wiki</ac:parameter>
<ac:parameter ac:name="diagramName">rulers-measurements.drawio</ac:parameter>
<ac:parameter ac:name="width">1151</ac:parameter><ac:parameter
ac:name="links" /><ac:parameter ac:name="tbstyle" /><ac:parameter
ac:name="height">911</ac:parameter></ac:structured-macro></p>

Search for the diagram file and restore it

  1. Copy the diagram name and enter it into Confluence’s search function.
    Tip: Restrict the search results to just Attachments.
    Filter the search results to attachments to find the moved diagram files
  2. If the revision parameter is 1, you can simply copy the diagram attachment back to your original page to fix the problem with the draw.io macro.
  3. If the revision parameter is higher:
    • Download the attachment from the incorrect page to your device.
    • Edit the original page and delete the old macro.
    • Insert a new draw.io diagram macro.
    • In the diagram editor, drag and drop the file you had previously saved onto the drawing canvas.
    • Save the diagram, and save the Confluence page.

Repeat these steps for each draw.io diagram macro on the page that is broken.

Tip: You can also recover a diagram from the .tmp file attached to a page if your browser or your Confluence Cloud instance had a problem that prevented your diagram/page from being published.

网站分类
最新文章
随机文章