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

Permission denied to access property "nodeType" on Alt Text (image) editing #1709

Closed
idiazroncero opened this issue Sep 4, 2018 · 12 comments

Comments

@idiazroncero
Copy link

idiazroncero commented Sep 4, 2018

Describe the bug
Error when uploading an image using the WYSIWG editor (widget:markdown, body field).
The error happens when you click on the ALT field of the image, (the image uploads correctly).
The error happens using both a gitlab and github backend.
The error is: Error: Permission denied to access property "nodeType""

To Reproduce

"Sorry!
There's been an error - please report it!
Error: Permission denied to access property "nodeType""

Expected behavior
Error doesn't happen.

Applicable Versions:

  • Netlify CMS version: 2.0.11
  • Git provider: Tried github and gitlab
  • OS: macOS Hight Sierra
  • Browser version: Firefox 61.0.2
  • Node.JS version: 8.11.4

CMS configuration

backend:
  name: git-gateway
  branch: master # Branch to update (optional; defaults to master)
  media_folder: 'static/img' # Media files will be stored in the repo under images/uploads

collections:
  - name: 'blog'
    label: 'Post'
    folder: 'posts'
    create: true
    slug: '{{slug}}'
    fields: 
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'datetime' }
      - { label: 'Summary', name: 'summary', widget: 'text' }
      - { label: 'Tags', name: 'tags', widget: 'list', default: ['post'] }
      - { label: 'Body', name: 'body', widget: 'markdown' }
  - name: 'pages'
    label: 'Page'
    folder: 'pages'
    create: false
    slug: '{{slug}}'
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'datetime' }
      - { label: 'Permalink', name: 'permalink', widget: 'string' }
      - { label: 'Navigation Title', name: 'navtitle', widget: 'string' }
      - { label: 'Tags', name: 'tags', widget: 'hidden', default: 'nav' }
      - { label: 'Body', name: 'body', widget: 'markdown' }

It's the original from the repo

@tech4him1
Copy link
Contributor

I can reproduce this on the CMS demo site in Firefox.

@tomrutgers
Copy link
Contributor

Possibly related to a bug with e.originalTarget in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=208427

@erquhart
Copy link
Contributor

erquhart commented Sep 4, 2018

Looks like:

  1. This functionality broke in 2.0.10 (repro), originally giving error: TypeError: i is not a function.
  2. Something changed in 2.0.11 (repro) so that the error message reported above shows.

The errors are originating from Slate. I'm betting the original break occurred due to the Slate dependency update that was released in 2.0.10. An issue on their repo shows other users experiencing this in recent months, and one of the commenters opened a Firefox bug report.

It seems this needs to be address within Firefox, but we won't know until someone responds to the bug report.

Update: A reproduction directly in Slate (try changing the Youtube video url by clicking it and then clicking the input that appears): https://www.slatejs.org/#/embeds

@erquhart
Copy link
Contributor

erquhart commented Sep 4, 2018

If someone is up for forking the Slate repo and figuring it which commit broke things, that would probably help their team on investigating a fix. I'm guessing it's the slate-react package, as I believe all DOM things happen there, but not certain.

@ghost
Copy link

ghost commented Sep 15, 2018

Windows 10 x64, FF 62.00 reporting in. Same issue.

@geonnave
Copy link

This issue also happens on Ubuntu 18.04 64-bit, Firefox 63.0 64-bit.

@anderskitson
Copy link

Same issue windows 10, firefox

@tech4him1
Copy link
Contributor

See ianstormtaylor/slate#2178.

@GitToby
Copy link

GitToby commented Dec 31, 2018

same issue with win10 firefox, also with the title edit section too

@danoc
Copy link

danoc commented Oct 19, 2019

Seems like the downstream fix has not yet made it into Netlify CMS. Any chance we can get slate-react upgraded? Happy to help if needed.

@erquhart
Copy link
Contributor

erquhart commented Nov 5, 2019

This will be fixed with #2828.

@erezrokah
Copy link
Contributor

Closing as fixed (didn't reproduce with Firefox/Chrome). Please comment/re-open if issue persists

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

No branches or pull requests

9 participants