Describe the Issue
Wikipedia Preview correctly applies CSS styling to elements with class="wmf-wp-with-preview", but tooltips do not appear when hovering over them.
This happens even when the span is hardcoded (so not as a result of the site being multilingual) into the template, meaning the issue is not related to dynamically generated content.
Steps to Reproduce
- Install the latest Wikipedia Preview WordPress plugin (v1.14.3).
- Add this hardcoded span inside any post or template file (index.php or a post editor block): `html <span data-wp-title="Vrije kennis" data-wp-lang="nl" class="wmf-wp-with-preview wiki">vrije kennis</span>
- Load the page and hover over "vrije kennis".
- The element has Wikipedia Preview styling, but no tooltip appears.
Expected Behavior
Clicking the Wikipedia Preview-enabled span should display a tooltip with content from Wikipedia.
Console Errors
There's a mysterious version difference in the console: "Wikipedia Preview - version 1.12.4 (26e7a880)" is printed as a "script is loaded" sort of message, but then when you run wikipediaPreview.init(); in the console you get the error:
wikipedia-preview.js?ver=1.14.3:102 Uncaught TypeError: Cannot read properties of undefined (reading 'root')
`at Object.Zs [as init] (wikipedia-preview.js?ver=1.14.3:102:970)` `at <anonymous>:1:18`
- Technical Details
- WordPress Version: 6.x
- Wikipedia Preview Version: 1.14.3
- Browser: Chrome
- Theme: Typesolid
Additional Context
The issue occurs even when auto-detection is disabled (wikipediapreview_enabled_post_types returns an empty array).
Manually calling wikipediaPreview.init() does not resolve the issue.
MutationObserver detects content changes, but tooltips still do not appear.