Links to segments not working

I have a bunch of links constructed like this:

https://suttacentral.net/pli-tv-kd15/en/brahmali#8.1.1

These links used to take me to the segment in the text, but I’ve done a hard refresh of my browser and these no longer work.

If I include ?reference=main, so it looks like this:

https://suttacentral.net/pli-tv-kd15/en/brahmali?reference=main#8.1.1

It works fine, which makes sense. But I just wanted to confirm if this is how I should construct my links now, and the old way I was doing it is obsolete?

3 Likes

That’s a bug, thanks for pointing it out.

For me it works in Chrome, but not in Firefox.

@HongDa can you look into this? We should make sure this works properly in all browsers.

No, there should be no need. The idea is that you only need the text and segment number, all else should inherit your browser settings (unless you want to specify the settings in the URL, which is why it has those attributes.)


Oh well, I can take solace in the fact that on my Ubuntu I can no longer even open Firefox, after testing just now it refuses to do anything. How is it that on a Linux machine FF doesn’t even open? Thanks Canonical you’ve made FF unusable in a snap!

1 Like

Both versions of the links work fine for me in FireFox (115.0, latest version atm). Also in different views (side-by-side, with/without notes).

1 Like

A new feature added a few days ago caused this error, I fixed it yesterday :pray:

5 Likes

I found in FireFox it worked for me, until I tried it in a private tab, and then it did not.

So when you are testing you might want to try it in a private tab if you aren’t already.

1 Like

Probably because private tabs bypass the local cache and get the latest JS, etc files

1 Like

Sorry, I found another cause of this bug, now fixed and pushed to the production server :pray:

5 Likes

All working great again for me. Thank you! :heart:

3 Likes

I’m uncertain where to put this, but it’s partly related to this issue. I thought there had been other mention elsewhere, if not an open ticket, about link bugs but I can’t find it, so I’m wondering if I’m fabricating memories!

  1. links when references aren’t displayed
    https://suttacentral.net/pli-tv-kd15/en/brahmali#8.1.1 doesn’t work if I have a view that doesn’t show SC references. However https://suttacentral.net/pli-tv-kd15/en/brahmali#pli-tv-kd15:8.1.1 does work fine whether or not references are displayed.
    An extra weirdness is that even when I have reference=none, main references are still showing up on initial load - I’m wondering if perhaps this was the fix originally? But once references are hidden, the segment link again doesn’t work.

  2. links to headers
    Similar issue, except the segment reference is never displayed for headers, e.g.
    https://suttacentral.net/pli-tv-kd15/en/brahmali#8.1.0
    But again, https://suttacentral.net/pli-tv-kd15/en/brahmali#pli-tv-kd15:8.1.0 works fine.

  3. links to “default” translation
    For example, links in sutta comments to vinaya (and vice versa) like at MN105:4.5. The generated link is
    https://suttacentral.net/pli-tv-bu-vb-pj4/en/sujato#2.1
    which doesn’t exist. No problem, suttacentral knows to automatically turn it into
    https://suttacentral.net/pli-tv-bu-vb-pj4/en/brahmali
    but it’s lost the segment reference.
    I noticed that sometimes the full link is specified, e.g. in dn27:14.1, there is
    [Bu Pj 1:2.2.5](https://suttacentral.net/pli-tv-bu-vb-pj1/en/brahmali#2.2.5)
    however, when I click on it, instead of right click + opening it in a new tab, the segment reference (#2.2.5) gets dropped. Opening in a new tab works fine (although, it has problem #1 above).

Both Brave (Version 1.65.132 Chromium: 124.0.6367.202 (Official Build) (64-bit)) and Firefox (123.0 (64-bit)) on lubuntu 22.04.

3 Likes

This appears for me on FF, Safari, Brave and Chrome on MacOS regardless of what view I had open previously:

Using this format for the link shows the relevant text highlighted:

2 Likes