"symbolic links" not checkable?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
wjs
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Thu Feb 17, 2011 7:41 am

"symbolic links" not checkable?

Post by wjs »

Checking pages of an URL lead to the following error message:

[error computing path] (../syn/gif/arr/arr-inh2.gif) ... missing alt attribute, height and width present

The path above is part of the html-content of a page and refers to a folder called "syn" via a "symbolic link". That means, that the syn-folder is at the same hierarchical level as the starting folder of the domain checked. The symbolic link must be and has been defined on server side. It works as expected if you show a page in any browser; the gif-files are loaded from the syn-subfolders correctly.

Any hint?

Kind regards,
Walter

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3471
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: "symbolic links" not checkable?

Post by Albert Wiersch »

Hi Walter,

I suspect you will need to setup a path mapping... this helps CSE HTML Validator calculate the correct path to check.

Here is more information:
http://www.htmlvalidator.com/htmlval/v1 ... g_node.htm

I could help you set it up if you tell me what is the full path of the file you are opening (the document that contains the link), the link that it needs to check (the value of the "href" attribute), and the full path to the link that the href points to.
Image
Albert Wiersch

wjs
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Thu Feb 17, 2011 7:41 am

Re: "symbolic links" not checkable?

Post by wjs »

Hi Albert,

I tried several syntax versions; but I did not succeed. Therefore the data (as en online example):

1) the full path of the file you are opening (the document that contains the link): http://www.drwjs.com/erfahrung.htm

2) the link that it needs to check (the value of the "href" attribute): <a href="http://www.drwjs.com/nutzen.htm"><img src="../syn/gif/arr/arr-inh2.gif" width="12" height="12" class="chk">Ihr konkreter Nutzen</a> [the image is an arrow icon inserted before the link-description]

3) the full path to the link that the href points to: http://www.drwjs.com//syn/gif/arr/arr-inh2.gif

PS: The path http://xx.xxx.xx.xx/var/www/vhosts/syn/ (that contains the icons) is not accessable [The requested URL /var/www/vhosts/syn/ was not found on this server.]

I hope I understood your request right and the data will help.

Thank you for your support,
Walter

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3471
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: "symbolic links" not checkable?

Post by Albert Wiersch »

Hi Walter,

I believe the link is wrong. "../" means "go up a directory" when it's already at the top directory. That's why CSE HTML Validator cannot computer the path. Instead of this:

Code: Select all

<img src="../syn/gif/arr/arr-inh2.gif" width="12" height="12" class="chk">
Try this root-relative link:

Code: Select all

<img src="/syn/gif/arr/arr-inh2.gif" width="12" height="12" class="chk">
Or this relative link:

Code: Select all

<img src="./syn/gif/arr/arr-inh2.gif" width="12" height="12" class="chk">
Or this relative link:

Code: Select all

<img src="syn/gif/arr/arr-inh2.gif" width="12" height="12" class="chk">
I hope this helps.
Image
Albert Wiersch

wjs
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Thu Feb 17, 2011 7:41 am

Re: "symbolic links" not checkable?

Post by wjs »

Hi Albert,

good news: all the three variants you proposed worked online properly (checking code and presenting the page in the browser ok)
bad news: offline working with HomeSite 5.5: link check led to "file not found" and no icon shown in the browser window

This seems to be plausible because ...

... offline the syn-folder has the same level as the root directory [to have centralized access from multiple domains in different folders on same level];
... online the syn-folder is a sub-directory of the root [created via a symbolic link]. Is there any trick offered by CSE to still use "../syn/gif/..." in the code and get the validator to interpret the code the right way like "syn/gif/..."?

Any other idea how to proceed without permanently search/replace between online/offline versions?

OK - I have found at least one SOLUTION:

I create symbolic links in Windows as well [command "mklink J/ ...] comparable to the symbolic links on server side.
Then the syntax I use is "syn/..." and it works online and offline.

Thank you,
Walter
Last edited by wjs on Mon Feb 21, 2011 9:45 am, edited 1 time in total.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3471
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: "symbolic links" not checkable?

Post by Albert Wiersch »

Hi Walter,

Great! I'm glad you found a solution, but if you're using "../syn/" on a top-level page, then I think that's wrong and could cause problems. Make sure you can use "File->Open from the Web" to get the document via HTTP and then do a link check and see if all the links are OK.
Image
Albert Wiersch

wjs
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Thu Feb 17, 2011 7:41 am

Re: "symbolic links" not checkable?

Post by wjs »

Hi Albert,

I made a mistake - it was just offline; no effect of the Path Mapping. But in the meantime I found a solution as mentioned above (I deleted the wrong issue):

OK - I have found at least one SOLUTION:
I create symbolic links in Windows 7 as well [command "mklink J/ ...] comparable to the symbolic links on server side.
Then the syntax I use is "syn/..." and it works online and offline.

Thanks,
Walter

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3471
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: "symbolic links" not checkable?

Post by Albert Wiersch »

wjs wrote:OK - I have found at least one SOLUTION:
I create symbolic links in Windows 7 as well [command "mklink J/ ...] comparable to the symbolic links on server side.
Then the syntax I use is "syn/..." and it works online and offline.
That sounds good, though I like to use root-relative paths like "/syn/...", so then it works from subfolders as well, if the link happens to be copied, used, or moved to a page in a subfolder. You could probably create a symbolic link to handle that as well if you wanted (I think it would have to be in the local root directory). I think your solution is fine though, if you don't think it is important to consider the case of the link being moved or copied to a document in a subfolder.
Image
Albert Wiersch

Post Reply