Lost links in Xway

I have a gallery page on one of my websites – small images that link to other pages, or sometimes an external link to YouTube Gallery When I want to add another image, I’ve been copying an existing and pasting it next to the original (I never thought to use the duplicate command). So when I copy and paste, all the links on the page are lost, whereas when duplicating, the links are retained. I’m just curious as to why this should happen.
Thanks
Geoff

Hi Geoff,

Do you have some steps to reproduce this? I’ve tried doing the following:

  1. New document
  2. Insert an image
  3. Add an internal link to the current page
  4. Copy the image and paste it back
  5. >> The pasted image still has its link

If I paste the image into a new document, it loses the internal link - because the page it’s linked to doesn’t exist in the new document. But if I give the original image an external link, the external link is carried across to the new document.

Hi Jeremy.
I’ve tried this on a new page and like you, find no problem. However, on two websites that have existing galleries, I still lose the links, both when I copy and paste, or when Insert a new image that shuffles the other images along. Duplicating, for some reason, works fine.
I’ve just tried duplicating the gallery page and all the links vanish. Duplicating the new test page retains the links.
Perhaps let Fujitsu have a look at it. I hear that they are good at making problems go away!
Happy New Year

Geoff

Can send me your document, or a cut-down version, along with some instructions on how to reproduce the problem?

To create a cut-down version, use Duplicate in the File menu to duplicate the document, and delete any pages that aren’t needed, before saving the duplicate document under a new name. Use a file sharing service (e.g. Dropbox) and send me a link via support at softpress dot com.

Hi Geoff,

Thanks for sending the cut-down document.

The reason that you are getting this behaviour is that your document contains nested links: there is a link on each of the three images, but there is also a link that encloses the three images (and the space characters around each image).

Nested links are invalid in HTML, and Xway tries to prevent them. But older versions of Xway failed to do this in cases where images with links were copied and pasted into text that already contained a link. There is another factor that may be involved: early versions of Xway did not actually apply links to images, but to the text containing the image (imagine placing a text cursor directly after an image and pressing shift left-arrow to get a text selection containing the image, then applying a link to that). This early behaviour (applying the link to the text containing the image) is similar to the way that links are output in HTML, but we changed it so that links remain attached to images if the image is moved or copied etc. If you originally created your document in an early version of Xway, this might be how the text link originated.

What is happening in your document now is that Xway b8 is doing a better job of preventing nested links - so when you copy and paste an image into text that already contains a link, it removes the link that is attached to the image. [It also removes links that are attached to other images within the same text link.]

What you can do to fix your document is this:

  1. Select one of the images
  2. Choose Select Parent from the Edit menu (this will select the text link that contains the images).
  3. Choose Link from the Format menu
  4. Click on the Remove button

This will remove the outer link that shouldn’t be there. Now, if you copy and paste an image next to itself, it will no longer be nested in an outer link, and Xway will not remove the link that is attached to the image. You can use these steps to check for nested links in your original (not cut-down) document. If you select an image that has a link and choose Select Parent from the Edit menu, and Xway shows a text selection that has a link applied, remove that link (you can also do this in the Link Inspector by choosing None from the Link Type popup).

Something else that I noticed in your document is that you have used multiple spaces to separate the images. This isn’t a good idea, because multiple spaces are normally reduced to single spaces in web browsers. The best way to space images is to use margins: in this case you could remove all the spaces around the images and apply left and right margins of 5 or 10 pixels. If you also need lines of images to be separated vertically, you could apply top and bottom margins with the same values. You can select multiple images and apply the same margin to all the images.

Thanks for that Jeremy. It explains a lot. I’ll work through your suggestions.
Regards
Geoff