Skip to content
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

language selection error in h5peditor.js #157

Closed
borovinskiy opened this issue Sep 27, 2022 · 1 comment
Closed

language selection error in h5peditor.js #157

borovinskiy opened this issue Sep 27, 2022 · 1 comment

Comments

@borovinskiy
Copy link

borovinskiy commented Sep 27, 2022

Branch Scenario have an error when adding Interactive video not for (english lang)

Uncaught TypeError: translation[i] is undefined
    updateCommonFieldsDefault https://udoba.org/sites/all/modules/h5p/modules/h5peditor/h5peditor/scripts/h5peditor.js?rgk4nu:280
    updateCommonFieldsDefault https://udoba.org/sites/all/modules/h5p/modules/h5peditor/h5peditor/scripts/h5peditor.js?rgk4nu:278
    updateCommonFieldsDefault https://udoba.org/sites/all/modules/h5p/modules/h5peditor/h5peditor/scripts/h5peditor.js?rgk4nu:278
    success https://udoba.org/sites/all/modules/h5p/modules/h5peditor/h5peditor/scripts/h5peditor.js?rgk4nu:230
    jQuery 6

I am found, that in h5peditor.js incorrect check translation (not check translation[i] === undefined) and this can fixed:

275c275
<     if (semantics[i].fields !== undefined && semantics[i].fields.length && translation[i] !== undefined &&
---
>     if (semantics[i].fields !== undefined && semantics[i].fields.length &&
280c280
<     if (semantics[i].field !== undefined && translation[i] !== undefined && translation[i].field !== undefined ) {
---
>     if (semantics[i].field !== undefined && translation[i].field !== undefined ) {
@fnoks
Copy link
Contributor

fnoks commented Oct 25, 2022

I believe this is a duplicate of h5p/h5p-interactive-video#258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants