emmetio / emmet-atom

Emmet support for Atom
MIT License
764 stars 180 forks source link

Expand Abbreviation from PHP echo - Uncaught TypeError: Cannot read property 'value' of null #362

Open pixelsmithdev opened 8 years ago

pixelsmithdev commented 8 years ago
  1. Expand abbreviation from PHP file
  2. echo 'div.test';

This use to work in past releases.

Atom Version: 1.2.4 System: Mac OS X 10.11.1 Thrown From: emmet package, v2.3.15

Stack Trace

Uncaught TypeError: Cannot read property 'value' of null

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:770

TypeError: Cannot read property 'value' of null
    at [object Object].EditElement (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/editTree/base.js:320:25)
    at new child (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/vendor/klass.js:35:12)
    at [object Object].<anonymous> (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/editTree/xml.js:54:27)
    at Array.forEach (native)
    at [object Object].editTree.EditContainer.extend.initialize (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/editTree/xml.js:35:11)
    at [object Object].EditContainer (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/editTree/base.js:66:19)
    at new child (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/vendor/klass.js:35:12)
    at Object.parse (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/editTree/xml.js:227:11)
    at Object.captureContext (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/utils/action.js:181:32)
    at Object.handlers.add.order [as fn] (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/action/expandAbbreviation.js:68:30)
    at /Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/assets/handlerList.js:93:19
    at /Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/utils/common.js:600:10
    at Array.some (native)
    at Object.find (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/utils/common.js:599:9)
    at Object.HandlerList.exec (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/assets/handlerList.js:92:10)
    at Object.expandAbbreviationAction (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/action/expandAbbreviation.js:110:20)
    at Object.run (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/action/main.js:150:21)
    at Object.run (/Users/mikevoermans/.atom/packages/emmet/node_modules/emmet/lib/emmet.js:81:23)
    at runAction (/Users/mikevoermans/.atom/packages/emmet/lib/emmet.coffee:92:12)
    at /Users/mikevoermans/.atom/packages/emmet/lib/emmet.coffee:57:1
    at Object.module.exports.exec (/Users/mikevoermans/.atom/packages/emmet/lib/editor-proxy.coffee:80:10)
    at /Users/mikevoermans/.atom/packages/emmet/lib/emmet.coffee:1:1
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:765:18)
    at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1152:26)
    at atom-text-editor.<anonymous> (/Users/mikevoermans/.atom/packages/emmet/lib/emmet.coffee:47:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:533:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:99:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:52.2.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:52.2.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:44.2.0 emmet:expand-abbreviation (atom-text-editor.editor.is-focused)
     -0:32.9.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-neutron-ui)
     -0:03.9.0 emmet:expand-abbreviation (atom-text-editor.editor.is-focused)
     -0:02.9.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:02.9.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:00.7.0 emmet:expand-abbreviation (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".sass-cache"
    ],
    "disabledPackages": [
      "minimap",
      "linter-scss-lint",
      "linter-php",
      "linter-jshint",
      "linter-coffeelint",
      "linter"
    ],
    "themes": [
      "neutron-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "emmet": {}
}

Installed Packages

# User
color-picker, v2.0.13
emmet, v2.3.15
file-icons, v1.6.12
neutron-ui, v0.4.0
project-manager, v2.6.5

# Dev
No dev packages

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

MurKit commented 7 years ago

I have this problem when press Enterin php file after not closed single quotes.

mateddy commented 7 years ago

Got the same problem as @MurKit did. Any fix yet?

sergeche commented 7 years ago

I’m working on a completely new Emmet implementation, please wait for next release 😎

MurKit commented 7 years ago

Wow, good news!

kurianbenoy commented 7 years ago

I too get the same problem when I press enter after a Githubissues.

  • Githubissues is a development platform for aggregating issues.