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.

10
  • what happens if you simply load an element in the modal rather than a component view...do you still get the same error?
    – Lodder
    Commented Dec 16, 2014 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
    Commented Dec 16, 2014 at 17:07
  • Hmm ok, and what if you add &format=raw to the end of the URL?
    – Lodder
    Commented Dec 16, 2014 at 17:20
  • The aha moment...I think it's Firebug, or at least in Firefox
    – GDP
    Commented Dec 16, 2014 at 17:22
  • I'll give this a test myself when I'm back from work if you still have issues
    – Lodder
    Commented Dec 16, 2014 at 17:25

1 Answer 1

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 and acknowledge you have read our privacy policy.

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