View Issue Details

IDProjectCategoryView StatusLast Update
0011279ScribusGraphics / Image Framespublic2025-05-17 20:38
ReporterFrederic.Bron Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSFedora CoreOS Version17
Product Version1.4.1 
Summary0011279: Image links get corrupted when symlinks involved
DescriptionSometimes but quiet often, when reopening a file, the image links get lost and a red cross replaces images. This happen to be an issue with the PFILE field in the .sla file.
I can edit the file in vim and replace all PFILE fields and the file is OK to be opened again.
Example:
good PFILE="img/image.eps"
bad PFILE="../../../../../../../a/b/c/d/e/img/image.eps"
This is exactly the same as http://bugs.scribus.net/view.php?id=5249 which was closed 5 years ago because it was marked as duplicates. However, I do not see the link with the duplicates.
Steps To ReproduceThe problem is reproducible:
in you home directory /home/userid, untar the attached pfile_bug.tar.bz2
in your home directory, create a directory foo with inside a symbolic link to your home directory:

$ cd
$ tar xvfj pfile_bug.tar.bz2
$ mkdir foo; cd foo; ln -s ../ home

Then open nautilus, go to your home directory then down to foo, down to home, down to pfile_bug and from here, open pfile_bug.sla by double clicking.
Then Scribus thinks it starts in /home/userid/foo/home/pfile_bug which is in fact /home/userid/pfile_bug.
If you now save the file, the PFILE link gets wrong. It was "img/image.eps" and is now "../../../pfile_bug/img/image.eps".
Note that "../pfile_bug/img/image.eps" would work but is not good either because if we rename the pfile_bug directory it is wrong again.
Additional InformationWork around: if you have links like that, open scribus from a terminal in the right directory or follow direct directory chain.
TagsNo tags attached.
Patch

Relationships

has duplicate 0011049 closedjghali paths to images are messed up if there is a symlink involved 

Activities

user4408

2012-12-19 21:37

 

pfile_bug.tar.bz2 (9,439 bytes)

Frederic.Bron

2012-12-19 21:45

reporter   ~0029459

I am the reporter of this bug. I had to delete my first account because I realized it was not a good idea to have my email adress as username (visible publicly!). If you can change that, would be fine.

jghali

2012-12-19 22:03

administrator   ~0029461

Last edited: 2012-12-19 22:05

I reassigned the bug to you. Thanks for the detailed explanation, i was previously unable to reproduce this issue.

Frederic.Bron

2012-12-20 11:34

reporter   ~0029465

Probably, the paths to image and .sla files are converted differently.
.sla file keeps the symlinks in the path and images remove them and have a direct path. Then Scribus goes up in the directory structure of the .sla file up to the common prefix. This is why there are too much ../.

Example:
directory of .sla file: /home/userid/pfile_bug or /home/userid/foo/home/pfile_bug
files: /home/userid/pfile_bug/plfile_bug.sla, /home/userid/pfile_bug/img/image.eps
converted to:
/home/userid/foo/home/pfile_bug/pfile_bug.sla
/home/userid/pfile_bug/img/image.eps
common prefix: /home/userid which is ../../../ relative to .sla directory
-> PFILE="../../../pfile_bug/img/image.eps"

jghali

2013-01-06 15:50

administrator   ~0029614

I committed a partial fix for this issue. The .sla real path is now used as the base directory for relative paths when saving documents.

Note that path such as "../pfile_bug/img/image.eps" may still be used when image path contains a symlink. Using systematically the real path for image is not appropriate as it may break cases where images are stored in a subdirectory of the sla directory and that subdirectory is itself a symlink.

Kunda

2014-07-24 00:50

updater   ~0032943

What's the fate of this issue? Do we need to close this one and clone a new issue to describe the rest of the fix needed?

JLuc

2014-07-24 16:31

developer   ~0032963

Last edited: 2014-07-24 16:31

Checking some of my SLA files, I have found various files where some PILES was "../../../../../somelinksfolder/symlinktosomeSLAfolder/images" instead of plain "images". As a consequence, i had to edit the SLA and correct the PFILE to change it into plain 'images'.
However this change is tedious, I'm not sure there is a possible improvement apart with 0011776 or 0011558 proposed "image manager" improvements.

@jghali : Note that both the image file and the SLA file could have been, at some time in their edit history, accessed via a symlink.

ale

2014-07-24 19:31

manager   ~0032965

/me is wondering why scribus does care about symlinks...

jghali

2014-07-24 21:10

administrator   ~0032968

Kunda, no we should not close this one.

ale, well unfortunately on *nix we have to if we want to generate relative paths correctly. The fact we were not handling symlinks at all is the trigger of this issue.

ale

2025-05-17 20:38

manager   ~0052603

a few years later, i still don't get why scribus should bother with symlinks.

i did a quick test and i can easily use relative paths to reference content in symilinked directory.

but i might be missing some context.

anyway, i wonder why we have not seen any further reports on this.
have people stopped using symlinks?
is it fixed?

Issue History

Date Modified Username Field Change
2012-12-19 21:37 user4408 New Issue
2012-12-19 21:37 user4408 File Added: pfile_bug.tar.bz2
2012-12-19 21:45 Frederic.Bron Note Added: 0029459
2012-12-19 21:55 jghali Reporter user4408 => Frederic.Bron
2012-12-19 22:00 jghali Relationship added has duplicate 0011049
2012-12-19 22:03 jghali Note Added: 0029461
2012-12-19 22:03 jghali Summary Image links get corrupted => Image links get corrupted when symlinks involved
2012-12-19 22:05 jghali Note Edited: 0029461
2012-12-20 11:34 Frederic.Bron Note Added: 0029465
2013-01-06 15:50 jghali Note Added: 0029614
2014-07-24 00:50 Kunda Note Added: 0032943
2014-07-24 00:50 Kunda Assigned To => jghali
2014-07-24 00:50 Kunda Status new => feedback
2014-07-24 16:31 JLuc Note Added: 0032963
2014-07-24 16:31 JLuc Note Edited: 0032963
2014-07-24 19:31 ale Note Added: 0032965
2014-07-24 19:50 jghali Assigned To jghali =>
2014-07-24 21:10 jghali Note Added: 0032968
2015-09-17 20:10 Kunda Category Graphics / Image Frames => Graphics/Img Frames
2015-09-17 20:11 Kunda Category Graphics/Img Frames => Graphics / Image Frames
2025-05-17 20:38 ale Status feedback => new
2025-05-17 20:38 ale Note Added: 0052603