- Visit a page with discussion tools and parsoid enabled, for example: https://en.wikivoyage.org/wiki/Talk:Western_food_in_Asia?useparsoid=1
- Scroll to the very bottom and click on "Mobile view"
- Note that the Discussion Tools "information bar" is missing under each heading. For example, under the first heading in desktop view reads "Latest comment: 4 years ago | 8 comments | 6 people in discussion", but in mobile view it just says "Latest comment: 4 years ago".
- Open the JavaScript console and note the uncaught "Type Error: startMarker is null" on the console.
- Click on any of the "reply" buttons: nothing happens.
- Click the "add topic" button: nothing happens.
With the patch the mobile and desktop views should display the same information under the heading and there should be no JavaScript error on the console. The Reply and Add Topic buttons should work. T376048#10268521 has a few other items you can test.
QA steps
- Confirm no errors in JS console on https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Talk:Dog&useparsoid=1
- Confirm reply, subscribe and add topic buttons show under the headings when expanded.
- Click reply buttons and make sure they work.
Requirement
Ensure the Type Error: startMarker is null issue is resolved for talk pages in MobileFrontend with Parsoid enabled, and verify that the Discussion Tools (Reply, Subscribe, and Add Topic) function as expected.
BDD
Feature: Fix discussion tools on talk pages with Parsoid enabled
Scenario: No JavaScript errors
Given a user visits a talk page with Parsoid enabled
When the page is loaded
Then there should be no JavaScript errors in the console
Scenario: Buttons appear under expanded headings
Given a user expands a heading on a talk page with Parsoid enabled
When the section is expanded
Then the Reply, Subscribe, and Add Topic buttons should appear
Scenario: Buttons function correctly
Given a user clicks the Reply, Subscribe, or Add Topic buttons
When the action is initiated
Then the respective tool or functionality should work correctlyTest Steps
Test Case 1: Verify no JavaScript errors
- Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Talk:Dog&useparsoid=1.
- Open the browser’s JavaScript console.
- Scroll through the page to ensure all components load.
- Verify that no JavaScript errors (e.g., Type Error: startMarker is null) are present.
- AC1: No errors appear in the JavaScript console.
Test Case 2: Verify buttons appear under headings
- Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Talk:Dog&useparsoid=1.
- Scroll to a section heading and expand it.
- Verify that the Reply, Subscribe, and Add Topic buttons appear under the expanded heading.
- AC2: The Reply, Subscribe, and Add Topic buttons are visible under expanded headings.
Test Case 3: Verify buttons function correctly
- Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Talk:Dog&useparsoid=1.
- Scroll to a section heading and expand it.
- Click on the Reply button and verify that the reply box opens.
- Click on the Subscribe button and verify that the subscription status updates.
- Click on the Add Topic button and verify that the topic creation tool opens.
- AC3: Reply, Subscribe, and Add Topic buttons function as expected.
Local development notes
This bug requires that MobileFrontend code runs before DiscussionTools. The bug only occurs with the following order of loadExtension calls:
wfLoadExtension('MobileFrontend');
wfLoadExtension('DiscussionTools');



