-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: tinyMCELanguageSelectorPlugin error related to Button ID #991
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #991 +/- ##
==========================================
- Coverage 67.77% 67.76% -0.01%
==========================================
Files 128 128
Lines 3230 3233 +3
Branches 937 937
==========================================
+ Hits 2189 2191 +2
- Misses 993 994 +1
Partials 48 48 ☔ View full report in Codecov by Sentry. |
if (IN_REVIEW_STATUS.includes(courseRun.status) !== isCourseRunInReview) { | ||
setTimeout(() => { | ||
this.setState({ isCourseRunInReview: IN_REVIEW_STATUS.includes(courseRun.status) }); | ||
}, 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this 0.1 value -- what was the reason for selecting this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried random values for the timeout, i.e. 500, 200, 100, 50. It's minimum value at which this error no longer appears.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is from your local testing, I would suggest keeping the deployment environment in mind when deciding this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe we can increase the timeout a bit, or let's try this out on staging first to check if the error still appears (cause I don't want to add unnecessary delay in rendering of review related fields)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add instructions to reproduce the issue locally in the PR description? Some details are present on our internal ticket, but would be great to add them here as well.
Done, I've added the steps to reproduce this error locally, you can test it out on stage as well. |
b974b5c
to
4cca100
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can repro the error by simply opening a course. And checkout out this code does not seem to fix it. Could it be that my local data is simply messed up?
Ah, it’s reproducible for me now, even after reloading the page. However it’s sort of flaky behavior, sometimes it appears on page refresh, and sometimes it doesn’t. Two days ago, it didn’t appear for me at all after refreshing the page. I’m not sure what the issue is. The PR above will resolve the error for the review state transition scenario. I think it would be better to ignore this error, as we did for support-tools |
This PR fixes the TinyMCE editor Language Selector
failed to find and set button ID in TinyMceLanguageSelectorPlugin after 3 attempts
. It adds a0.1-sec
timeout to prevent TinyMCE from appearing immediately after the state change, as the editor reloads afterward, causing it to disappear and triggering the error above.Error Reproduction Steps:
failed to find and set button ID in TinyMceLanguageSelectorPlugin after 3 attempts in the console log
.