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

Error: The head node of a wormhole must be attached to the DOM #71

Open
RobIsHere opened this issue Oct 4, 2016 · 7 comments
Open

Error: The head node of a wormhole must be attached to the DOM #71

RobIsHere opened this issue Oct 4, 2016 · 7 comments

Comments

@RobIsHere
Copy link

I just experienced a problem with ember-wormhole 4.0 used by ember-power-select.

A quick google search got me to this issue on the ghost blog, which describes exactly my problem and was solved by reverting to 0.3.6:
TryGhost/Ghost#7073

As the version upgrade 0.3.6 to 4.0 is about dom changes for fastboot, it looked possible that a bug was introduced there. So I also downgraded to 0.3.6 and that solved it without further changes.

Best regards,
Robert

Ember 2.5.1
Ember Data 2.7.0
jQuery 2.2.4

@lukemelia
Copy link
Contributor

@RobIsHere would you mind trying the new 0.5.0 and see if that works for your situation or not?

@SaladFork
Copy link

SaladFork commented Oct 31, 2016

Seeing this issue as well (Ember 2.8.1), and upgrading to 0.5.0 (in our consuming app [note we use ember-modal-dialog which has an older version]) did not resolve it. I'll keep trying to create a minimal reproduction but haven't been able to yet.

In case it helps / is relevant, our usage roughly came down to a template with an {{#if that toggled between two {{#ember-modal-dialogs:

{{#if someCondition}}
  {{#ember-modal-dialog}} {{! one }} {{/ember-modal-dialog}}
{{else}}
  {{#ember-modal-dialog}} {{! two }} {{/ember-modal-dialog}}
{{/if}}

And an action which both toggled the condition and bubbled up to the route to transition away (resulting in no dialog being shown).

We ended up refactoring the code away from toggling the conditional in the action that transitions away and are no longer seeing this issue.

@venkateshg5887
Copy link

@lukemelia I tried the version 0.5.0 you suggested but no luck. It get solved only when reverting to 0.3.6

@jasonbekolay
Copy link

(For someone who may be googling the error message...)

I was seeing the same error, although my use case was different. I have my own component that extends ember-wormhole and started seeing this error at version 0.4.0. The template for my component looked like this:

some extra stuff
    {{yield}}
some more extra stuff

The solution was to add the unbound helpers to my template:

{{unbound _wormholeHeadNode ~}}
some extra stuff
    {{yield}}
some more extra stuff
{{~unbound _wormholeTailNode ~}

@jacojoubert
Copy link

I ran into this error with the latest version of Ember (2.13.2). Turned out it was an addon that was running old version of ember-cli. Upgrading it fixed the issue.

@jlami
Copy link

jlami commented Dec 15, 2017

@jacojoubert what part of the addon needed updating? I'm running into this problem too and can't really find anything in any addon. Only some that use old ember-cli-htmlbars (1.3.4)

In my case it seems to be happening in a render update. Maybe the contents has been moved correctly to the destination but there is a problem when they are moved back?

@jacojoubert
Copy link

@jlami I just updated all the dependencies of my private add-on and it fixed the issue.

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

7 participants