Magnific Popup stopped working

Permalink
Hello,
For some reason my magnific popup has stopped working. I have used it for an enquiry form, but now it just goes to a page not found 404.

Please seehttp://gotimetrekkers.com/gbg027-lost-monuments-peak-district... Enquiry button on right side of screen.

I think it may have something to do with the button going tohttp://gotimetrekkers.com/.ccm-page.popup-enquiry-form... rather than .ccm-page.popup-enquiry-form , but I can't figure out how to change it.

Thanks in advance if you can help!

 
WillemAnchor replied on at Permalink Reply
WillemAnchor
it's in maintenance mode
PJSAndo replied on at Permalink Reply
Sorry. Now deactivated.
Still no luck though.

I'm sure it's just changing the gotimetrekkers.com/.ccm-page.popup-enquiry-form to .ccm-page.popup-enquiry-form but I have href=".ccm-page.popup-enquiry-form" as the link which did work...mmmm?
WillemAnchor replied on at Permalink Reply
WillemAnchor
you have some js errors in your console.

where are you loading your assets ?
PJSAndo replied on at Permalink Reply
How do you mean? I'm no great coder so the simpler the better...

The enquiry button and popup (magnific) form is part of a custom block.

The following code is loaded at the bottom of the view.php in the block.

<script  data-cfasync="false" type="text/javascript">
$(document).ready(function() {
   $('#openEnquiryForm').magnificPopup({
      type: 'inline',
      mainClass: 'mfp-fade',
        removalDelay: 160,
      preloader: false,
      focus: '#name',
      // When elemened is focused, some mobile browsers in some cases zoom in
      // It looks not nice, so we disable it:
      callbacks: {
         beforeOpen: function() {
            if($(window).width() < 700) {
               this.st.focus = false;
(


Is that what you were after?
WillemAnchor replied on at Permalink Reply
WillemAnchor
in your block's controller, view(), make sure you have:
$this->requireAsset('javascript', 'jquery');
$this->requireAsset('javascript', 'core/lightbox');
$this->requireAsset('css', 'core/lightbox');
WillemAnchor replied on at Permalink Reply
WillemAnchor
and of course clear cache on c5 and your browser
PJSAndo replied on at Permalink Reply
Yep that is there.
WillemAnchor replied on at Permalink Reply
WillemAnchor
just to be sure, it's in view() right ?

there is a problem loading jquery

the other error I get (but later) is:
"NetworkError: 404 Not Found -http://gotimetrekkers.com/concrete5/packages/fundamental/themes/fun...

ok, good luck, I got some other stuff to do now first.
PJSAndo replied on at Permalink Reply
From controller.php
public function view()
    {
   $this->requireAsset('javascript', 'core/lightbox/launcher');
    $this->requireAsset('javascript', 'core/lightbox');
    $this->requireAsset('css', 'core/lightbox');         
    }
WillemAnchor replied on at Permalink Reply
WillemAnchor
jquery isnt included...
PJSAndo replied on at Permalink Reply
OK. Still no good....

I'll have a think