This is more of a systemic thing than just a single bug.
I just noticed that some Vocab items are accessible from more than one āofficialā URL. For example, the Vocab for Hokkaido is accessible from these 2 different URLS:
- https://bunpro.jp/vocabs/hokkaido-island
- https://bunpro.jp/vocabs/åęµ·é-Hokkaido-%28island
Well, okay, for some reason, the first link stopped working, but I swear it was working a few minutes ago.
Maybe by the time you read this itāll start working again?
There are a couple issues with this situation.
Issue #1
First off, I need to mention that when I was accessing it via the first link, the āCopy a link to this page to the clipboardā button would always copy the first link. But when I was accessing it via the second link, the Copy Link button would copy the second link!
Thus, according to the Copy Link button, there are two ācanonicalā links to the same Vocab page.
So, first issue is that the Copy Link button (āCopy a link to this page to the clipboardā) should always have the same, single, canonical URL in it. Probably this should come directly from the DB, perhaps with a dedicated ācanonical URLā field for each vocab ā not copy it from the browser (which is how Iām presuming itās currently being done).
Note that this issue (#1) is about the Copy Link button. The bigger issue (#3) will be about the underlying page/data structure, although the two issues are fairly linked.
Issue #2
Second, and this is a relatively minor one, but I just want to get it out of the way: The second link contains an open-parenthesis ā(ā, but this messes up the Hyperlink feature of these here forums, so that you canāt easily copy/paste the URL into a forum post. I had to manually insert a URL-encoded %28 in order to get the second link to show up without issue. Otherwise, it ends up like this:
Which leads to a 404.
So, second issue is that canonical URLs should (ideally) not contain characters that mess up the BP forumās Hyperlinking feature(s). (Or maybe somehow fix the forums so that they can handle the pasting of URLs with such characters.)
Issue #3
Fundamentally, though, the main issue is that item pages (Vocab or Grammar) should have a single, unique, canonical URL associated with them (again, related to issue #1, but this time about the data rather than the UI).
It should be the same canonical URL regardless of the URL used by the browser (or whatever other inclusion mechanism) to access it. Think of it like a āpermalinkā, although perhaps in the back-ground it might be modifiable, unlike a true permalink ā but modifying it should be rare and done carefully.
There are numerous possible issues that could come up as a result of allowing different canonical-seeming URLs to bring up the same canonical page. In fact, Iām having a brain fart right now and having a hard time coming up with some of them, although I had a few in mind when I first started writing this out. 
A basic example, though:
User editing the same page via different URLs, but not realizing they represent the same page, may be making edits on each copy, in different browser tabs. May save edits on one tab, then switch to second tab, save those edits, effectively over-writing the edits made in the first tab.
I use a Duplicate Tabs plugin to prevent myself from doing this kind of thing, but it is defeated if the same page can be opened using two different URLs.
In general, while itās generally okay for different URLs to lead to a single canonical page, the page itself should have a unique āidentityā, accessible in the form of a single canonical URL. For much the same reasons itās best to have a single canonical ID for database records. Especially when linking things. Youāre basically āasking for troubleā by not having them.
Anyway, kinda fizzled out there due to brain fart. But I think the fact that the Copy Link button produces different URLs depending on how the page is accessed is alarming enough, IMHO. Anywho⦠yeah.
