Firstly, i think Sorry_Duh is probably on the correct track, the message indicates the component may be missing which in a node setup would be in the layout page.
Also, while there is nothing wrong with your approach of using the click event to open the modal, you can do this more easily by setting the action toggle of the button