Cross-page file links & images are not updated on move or rename

Reported by K. Bauer on 2012-12-04
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Zim
Medium
Unassigned

Bug Description

Zim-Version: 0.57 (Windows installer)
OS: Windows 7 64bit

=== Scenario ===

* A page "Page1" contains attachments, e.g. a graphic "image.png"
* A page "Page2" contains
    - A link [path/to/Page1/image.png] to the image file.
    - The image file inline {{path/to/Page1/image.png}}
    - A link [:path:to:Page1] to the other page.

=== Observed Behaviour ===

When Page1 is renamed or moved
* The link [:path:to:Page1] is updated.
* The link [path/to/Page1/image.png] to the graphic is NOT updated.
* The image inclusion {{path/to/Page1/image.png}} of the graphic is NOT updated.
Hence Page2 is broken without warning.

When Page1 is deleted, Page2 is also broken without warning.

=== Expected Behaviour ===

* When an attachment folder is moved or renamed, links to this folder should be updated.
* When an attachment folder needed by other pages is deleted, a warning should be given.

=== How it might be done / Notes ===

* This probably implies, that attachments, that are linked to, should be indexed (if it isn't done already).
* Note that attachment folders may have subfolders, that don't correspond to zim pages.
* Can be considered related to https://bugs.launchpad.net/zim/+bug/330320 as such file links might sometimes be created as a work-around for copying from pages with images.

=== Wishful Thinking ===

* When an attachment folder is deleted, but some files are still needed by other pages, the user might be offered to relocate those files to a different page's attachment folder.
* If such a function was implemented, moving attachments between pages should be easy to implement for the Attachment Browser plugin.

K. Bauer (k.bauer) on 2012-12-04
description: updated
K. Bauer (k.bauer) on 2012-12-04
description: updated

Need refactoring of the index to track files as well

summary: - Cross-page file links are not updated (also affects images)
+ Cross-page file links & images are not updated on move or rename
Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers