Yes I understand. I did not get any other error.
I manage to fix this. What the close button actually did, was closing the lightbox and refreshing the page.
I found a div which closes the lightbox. So i modified it with CSS en jQuery to refresh the page after closing.
This div is:
<div class="mfp-close"></div>
The script is use is:
// refresh after closing lightbox
$(document).on("click", ".mfp-close", function(){
location.reload(true);
});
You also need to play with the CSS to make this div visible.
This is my CSS:
.mfp-iframe-holder { padding: 40px !important;}
.mfp-iframe-holder .mfp-close{
display: block;
top: -30px;
width: 60px;
height: 60px;
right: -20px;
z-index: 1;
opacity: 1;
padding: 0;
box-sizing: border-box;
cursor: pointer;
background: url("../images/close4.png") center center no-repeat;
background-size: contain;
}
Don't forget to use a background image.
I know this is not THE solution, but it might help others, till there is a better solution.