Title: appendChild error for nonexistent &#8220;Attach to&#8221; element
Last modified: December 11, 2020

---

# appendChild error for nonexistent “Attach to” element

 *  Resolved [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/appendchild-error-for-nonexistent-attach-to-element/)
 * I’ve set the “Attach to” floater setting to `#main`, which exists on every page,
   except the checkout page. Since the element doesn’t exist, the browser console
   shows the error `Uncaught TypeError: Cannot read property 'appendChild' of null`.
 * [If it makes a difference, this is on WP 5.6 (jQuery 3.5.1) with jQuery Migrate
   disabled, but when WP 5.7 comes along, this will be the setup.]
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fappendchild-error-for-nonexistent-attach-to-element%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [micropat](https://wordpress.org/support/users/micropat/)
 * (@micropat)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/appendchild-error-for-nonexistent-attach-to-element/#post-13779319)
 * Thanks for reporting. That’ll be fixed in the next release. In the meantime, 
   a workaround is to add an additional selector that _is_ available on the checkout
   page, for example:
 * `#main, #checkout`

Viewing 1 replies (of 1 total)

The topic ‘appendChild error for nonexistent “Attach to” element’ is closed to new
replies.

 * ![](https://ps.w.org/add-to-any/assets/icon.svg?rev=972738)
 * [AddToAny Share Buttons](https://wordpress.org/plugins/add-to-any/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-to-any/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-to-any/)
 * [Active Topics](https://wordpress.org/support/plugin/add-to-any/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-to-any/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-to-any/reviews/)

## Tags

 * [floating](https://wordpress.org/support/topic-tag/floating/)

 * 1 reply
 * 2 participants
 * Last reply from: [micropat](https://wordpress.org/support/users/micropat/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/appendchild-error-for-nonexistent-attach-to-element/#post-13779319)
 * Status: resolved