Closed Bug 51746 Opened 24 years ago Closed 23 years ago

Composer does not save as inserted images with relative URLs

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 72583
Future

People

(Reporter: johng, Assigned: akkzilla)

References

Details

Attachments

(1 file)

Repro:
> create a page from scratch using Composer (build 2000090508)
> insert some images from your hard drive
> save the composer document to a network drive (not local)
> view the page from another computer (it will be in cache or in the correct
location on your computer so you will think it worked but it did not)

What should happen:
> when you save the html file to the remote drive, it should also save the
images (gif files in this case) to that remote drive and have the pointers to
the gifs in the html be relative so they work in the new location.
nominating nsbeta3
Keywords: nsbeta3
The problem is that it did not use a relative link.  Specifically, the image tag
was:

<img src="file:///D|/search-newtab-fr.gif">
which pointed to my local drive.

The image tag should have been:
<img src="search-newtab-fr.gif">
with the images saved in the same directory as the html
this functionality is part of the publishing feature which we are planning to do 
for the next release
Whiteboard: [nsbeta3-]
Target Milestone: --- → Future
This is a painful situation, as we didn't want to deal with what is mostly
a publishing issue, as Beth points out.
Should we at least strip off absolute location prefixes as John suggest, but
only if image URL is "file:///"? (Assume http: references aren't a problem).
If we do, should we also tell the user somehow that they must move images
to the same directory as where they save the HTML page?
At this late stage we just cannot invoke this functionality within composer.  It 
would seem to me that we would need to query the user for certain pieces of 
information to know whether we should do relative or absolute referencing.  That 
work needs to be done for the publishing feature so let's leave this as futured 
to be addressed in the next release.
Status: NEW → ASSIGNED
Summary: Composer does not save inserted images to correct drive → Composer does not save as inserted images with relative URLs
Depends on: 28792
-->akkana
Assignee: beppe → akkana
Status: ASSIGNED → NEW
OS: other → All
Hardware: PC → All
This issue is completely fixed when inserting images via the Image Properties
dialog when fix for bug 72583.
There is still the issue of drag&dropped and HTML including img pasted from
the clipboard. That should be a separate bug.
For the discussion I see here, I think we should just dup this to 72583.
Akanna: If you agree, please do that
there is also the issue with existing documents
This isn't (entirely) a duplicate of bug #72583 and should remain to cover all 
issues.
Keywords: nsbeta3
Whiteboard: [nsbeta3-]
We already have a bug to cover url rewriting for publishing; and Charley's
recent changes solve the problem for new inserted images nicely.  I'm duping
this.  Kathy, if you disagree, please let me know what issues this bug still
covers which aren't covered by the publishing work ...

*** This bug has been marked as a duplicate of 72583 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
The only (possibly) remaining issues might be:
 * preference to always save with relative links
 * prompt user when we encounter possible broken links (?)

After #72583 is fixed, we'll still have a problem with dragged images (from OS).

Perhaps each of these should be filed as separate issues?
Yes, let's keep all those issues separate; they're all in different parts of the
code and invite different sorts of UI discussions.
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: