question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'unbind' of undefined

See original GitHub issue

I installed "@tinymce/tinymce-react": "^2.3.0", I wrote my own component following the documentation

import React from "react";
import { connect } from "react-redux";

import { Editor } from "@tinymce/tinymce-react";

/**Actions */
import { editorOnChange } from "../../../actions";

class CKEditor extends React.Component {
  handleEditorChange = (content) => {
    const {
      id,
      editorOnChange,
      reducer: { actionType },
    } = this.props;
    editorOnChange(actionType, id, content);
  };

  render() {
    return (
      <Editor
        apiKey="8g8nxiiua9o6rxmlgdkupdq0cwtn4ws1819v8typvr8opxb0"
        init={{
          plugins:"powerpaste",
          toolbar:
            "formatselect | paste | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat | fontselect | fontsizeselect",
          font_formats:
            "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Helvetica=helvetica;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;Akzidenz-Grotesk Std=Akzidenz-Grotesk Std",
        }}
        value={this.props.value}
        onEditorChange={this.handleEditorChange}
      />
    );
  }
}

const mapDispatchToProps = {
  editorOnChange,
};

export default connect(
  null,
  mapDispatchToProps,
)(CKEditor);

I use this component at least at 3 different pages. When i’m load this component at first, it’s all ok, no crashes, but when i want to change page to another, where editor component is use too, i have a crash and error at console

Uncaught TypeError: Cannot read property 'unbind' of undefined
    at Yx.<anonymous> (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:76)
    at Jg.c.fire (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at Yx.fire (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at rp (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at qx (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at Yx.remove (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at Object.remove (tinymce.min.js?apiKey=0vljbszrz9brsvptl0vgtuitgk4b8rt3wc0c65kj49nmvuz7:8)
    at Editor.componentWillUnmount (Editor.js:71)
    at callComponentWillUnmountWithTimer (react-dom.development.js:14280)
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)

It only happens when there is plugins property available. If i remove it, everything works good Version of Tiny - "@tinymce/tinymce-react": "^2.3.0",

I updated api key to premium, but the problem has not disappeared

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fyrkantcommented, Nov 14, 2018

We have found the root of the problem and will release a new version of powerpaste with the fix soon.

0reactions
einarqcommented, Nov 21, 2018

Never mind. Source-tree was not able to detect the changes, but Beyond Compare does.

Thanks

On Wed, Nov 21, 2018 at 11:11 AM Einar Paul Qvale < einar.paul.qvale@gmail.com> wrote:

Could you perhaps have forgotten to actually publish the changes? Here is the only difference in the powerpaste plugin from what we have already

[image: image.png]

On Fri, Nov 16, 2018 at 2:56 PM Johan Sörlin notifications@github.com wrote:

This should now have been corrected and released to the cloud stable channel.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tinymce/tinymce-react/issues/36#issuecomment-439400188, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM_DxPNaFvOD07Ifh8x-kleVWM7DiInks5uvsP9gaJpZM4XzV4- .

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript error: Uncaught TypeError: Cannot read property ...
So querySelectorAll returns an empty NodeList which has undefined at the 0 position (or any position for that matter). Breakdown of what is...
Read more >
How to deal or remove "Cannot read property 'destroy' of null"
"Cannot read property 'destroy' of null" - This error has occurred because the underlying js implementation gets failed to initialize the global ...
Read more >
Error: Cannot read properties of undefined (reading 'remove ...
My issue is that when I press the next button, I get the following error. Error: Cannot read properties of undefined (reading 'remove')....
Read more >
Uncaught TypeError: Cannot read property 'remove' of ...
Hey, you first need to know what is undefined, the remove is trying to do it's thing in something that is not defined,...
Read more >
uncaught type error cannot read property set attribute of ...
Remove console error “Uncaught TypeError: Cannot read properties of undefined (reading 'setAttribute')”. Save ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found