Fixed Full URLs in links

Matt C.

Well-known member
Affected version
2.1.0 Beta 5
After I upgraded to 2.1.0 Beta 5, I noticed that some links use full URLs.

190553

It used to be just /whats-new/news-feed/. This makes customizations harder to go across multiple forums.

After I upgraded this stopped working:
Code:
&[href="/whats-new/news-feed"]::before
{
}

Thank you.
 
Does it work if you change the selector to one like this: https://www.w3schools.com/cssref/sel_attr_contain.asp

So it’d be something like href*=“


Fillip

Wow, that works so much better. Thank you @DragonByte Tech!

Now I don't have to use this:

CSS:
<xf:if is="{$xf.options.useFriendlyUrls}">
&[href="whats-new/news-feed"]::before
{
}
<xf:else />
&[href="index.php?whats-new/news-feed"]::before
{
}
</xf:if>

But I still think the links shouldn't use full URLs. The average user wouldn't know about that selector.
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.13).

Change log:
The request pather was incorrectly outputting "full" links instead of "base" links.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Though I have changed this, it's not really related to your use case -- it's simply unnecessary in the default case (and thus outputs extra text).

Your selector would have also depended on the install not being in a particular directory (and route filters not being in use). Not to mention, while I understand why you were trying to do this, the exact value of a link isn't an unchangeable thing.
 
Though I have changed this, it's not really related to your use case -- it's simply unnecessary in the default case (and thus outputs extra text).

Your selector would have also depended on the install not being in a particular directory (and route filters not being in use). Not to mention, while I understand why you were trying to do this, the exact value of a link isn't an unchangeable thing.

Will using the link tag like Fethi.dz suggested resolve this?
 
@Matt C. this works fine for me with XF2.1 b5
Less:
.menu-linkRow
{                            
    &:before
    {
        .m-faBase();
        .m-faContent(@fa-var-question-circle-o);
        margin-right:5px;
        display:inline-block;
        text-align:center;
    }

    &[href*="/whats-new/news-feed"]:before {.m-faContent(@fa-var-star);}
}

190647
 
Why was my post deleted with an important description of the problem?
It is RELATED with this fix

Before deleting a post - it makes sense to ponder the meaning of what is written.

Check my problem resolve in this post:
 
I deleted the post because it is unrelated to the issue you have reported. If a moderator performs an action you do not disagree with and you have a question, please contact a member of staff. Do not go defiantly make the same post again, please see the Terms and rules, particularly rule #13.

Regardless of anything else, even if it was relevant, you have already posted a new bug report which is perfectly sufficient and that bug report will be dealt with in due course.
 
Top Bottom