3

Using my own answer for What is best approach to show the component page in popup-modal window without header and footer?, I mentioned that I was getting JS errors, so when as I further investigate, they persist:

TypeError:Argument 1 of Node.contains does not implement interface Node
http://mysite/mediamedia/system/js/modal.js

Update: Turns out to be a Firefox issue, not Joomla, so pondering deleting the question pending resolution.

I put this lines directly into index.php of the Protostar template of a fresh default installation of Joomla 3.2.4 and tried it that way.

<?php
JHTML::_('behavior.modal');
?>
<a class='modal' href='index.php?option=com_content&view=article&tmpl=component&id=10&Itemid=180'>Modal link</a>

A small popup does appear, but contains nothing - has anyone dealt with this before? - I'm stumped.

  • what happens if you simply load an element in the modal rather than a component view...do you still get the same error? – Lodder Dec 16 '14 at 17:06
  • Not sure what you mean or how to try it ... made the link go to google.com instead, and no error, but infinite spinner in the popup – GDP Dec 16 '14 at 17:07
  • Hmm ok, and what if you add &format=raw to the end of the URL? – Lodder Dec 16 '14 at 17:20
  • The aha moment...I think it's Firebug, or at least in Firefox – GDP Dec 16 '14 at 17:22
  • I'll give this a test myself when I'm back from work if you still have issues – Lodder Dec 16 '14 at 17:25
3

There is nothing wrong with your code. Try:

  • Turn on Joomla's Error Reporting and see if there is any error message

  • Disable Adblock if you have it

  • Open the link in a separate tab and see if it's valid (ie Joomla does not throw an error)

  • Use absolute URL instead of relative

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.