Popups is currently not compatible with Wikidata. We disabled it in production, but I suspect forgot to turn it off in labs. :/
I'm actually going to be doing some work on T111231 and T167787 today, following up from some work in the hackathon, as I think it would be pretty straightforward to get Popups and Wikidata working together.
We should either disable it on beta cluster in the mean time, or if it's not too much hassle, retain it as a reminder to fix this.
@Jdlrobson Hint for changing those links taken.
Conceptually... These are links that point to the same page (save for the anchor) that we are already on. Is it not a valid assumption that there is no value in previewing this? Could/should the check not be implemented in popups generally?
@Pablo-WMDE hey, I see what you mean. Since the link element has an href it tries to parse it even though it points to the same page.
I've opened up T198652 to fix that generic case. Thanks for pointing that out.
Regardless, I'd definitely recommend avoiding href's altogether in this situation. href="#" is kinda redundant these days unless you actually want to clear the hash fragment in the address bar.