There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-89aea6cf-5710-48d1-8664-b936d8c6cb92 XWIKI-24993 Open

The anchor of a link to another page is dropped from the URL unless a query string is also set

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-35d3c0b1-03de-4187-b10a-419c3d9b0a90 Thomas Mortagne on 15/Sep/26 18:01
 
Links with an anchor and no query string are very common (xwiki.org if full of those) and I don't remember ever having this problem.

I tried on 17.10.9, and I still cannot reproduce what is described:

{noformat}
[[Main.WebHome||anchor="toto"]]

{{velocity}}
$xwiki.getURL('Main.WebHome', 'view', '', 'HTest')
{{/velocity}}
{noformat}

produces the following HTML

{noformat}
<p><span class="wikilink"><a href="/xwiki/bin/view/Main/#toto"><span class="wikigeneratedlinkcontent">Main</span></a></span></p><p>/xwiki/bin/view/Main/#HTest</p>
{noformat}

The problem might be more what you used to test. AFAIR XWikiSyntax has a pretty special way
to of treating page content.