Page MenuHomePhabricator

Wikipedia Preview plugin errors out when deleting characters from target word
Closed, ResolvedPublicBUG REPORT

Description

A feature supported by our plugin is removing the preview if you delete/edit the target word, this is currently erroring out on main branch with

Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at al (react-dom.min.js?ver=18.2.0:10:82583)
    at Rt (react-dom.min.js?ver=18.2.0:10:50491)
    at react-dom.min.js?ver=18.2.0:10:50350
    at s (data.min.js?ver=e6595ba1a7cd34429f66:9:2282)
    at c (data.min.js?ver=e6595ba1a7cd34429f66:9:2308)
    at data.min.js?ver=e6595ba1a7cd34429f66:2:20459
    at data.min.js?ver=e6595ba1a7cd34429f66:2:18787
    at h (data.min.js?ver=e6595ba1a7cd34429f66:2:8145)
    at data.min.js?ver=e6595ba1a7cd34429f66:2:11025
    at redux-routine.min.js?ver=b14553dce2bee5c0f064:9:750

https://react.dev/errors/185?invariant=185

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

QA instructions

As shown in video above, the plugin should not crash when attempting to remove the preview either by clicking the remove button or by directly deleting a character from the target word. Instead, the preview should simply be removed

QA Results - WordPress Dev

ACStatusDetails
1T367115#9882350

Event Timeline

eamedina triaged this task as High priority.
eamedina updated the task description. (Show Details)
eamedina moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

@eamedina The plugin no longer crashes when you select "remove" or edit/delete a Wikipedia preview word(s) as seen in the video below. I will move this to design sign-off. Thanks for all your work!

Status: ✅PASS
Environment: WordPress Dev- 6.5.4; Wikipreview: 400afec; WP Wikipediapreview” commit 54907e9e5b56fa6627c1eedae6315e3da6bd1bb6, Tue Jun 11 11:33:36 2024 -0400
OS: macOS Sonoma 14.5
Browser: Chrome 125, Firefox 126, Safari 17.5
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/dogs/

✅AC1: https://phabricator.wikimedia.org/T367115