Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1326876

    Hi,
    I wonder if you guys changed anything with magnificPopup with 4.8.7. I use a piece of code, given by you, to have buttons or links open popups :

    function popup_inline() { ?>
    <script type="text/javascript">
    jQuery(window).load(function(){
        	jQuery('.pu-link a').addClass('open-popup-link');
    		jQuery('.open-popup-link').magnificPopup({
    	  type:'inline',
    	  midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
    	});
    });
    </script>
    <?php }
    
    add_action('wp_head', 'popup_inline');

    This worked flawlessly until I updated to 4.8.7 – but not everywhere, for some reason. I’ll give you, in private, links to the test site (on 4.8.7) which shows a critical error, and the same page on the production site (on 4.8.6.5), which works great. On the developper tools, there is this message :
    “Uncaught TypeError: jQuery(…).magnificPopup is not a function”
    The weird thing is that this piece of code is also used on the homepage, and doesn’t seem to be malfunctionning there… Do you have an idea what’s wrong here ?

    Thanks for your help !

    #1326955

    Hi again,
    I’m sorry, I had misdiagnosed the problem… It actually appears that it is the ‘filter by date’ feature in the Blog Article avia element that bugs out. I use it on the pages mentionned, to selectively show some specific blog posts in a section of the page.

    As soon as, in the builder, I change this parameter (and decide to ‘show all’ or filter by time period’), everything works again. Maybe a typo in there ? Where should I look to check this ?

    Oh, and since the problem is not at all what is in the title, should I make a new thread ?

    Thanks !

    #1326961

    Hi again,
    I think I’ve found the issue…
    Here is the relevant passage in postslider.php (I looked in 4.8.6.2), around line 1106 :

    				$date_query = array();
    				if( 'date_filter' == $params['date_filter'] )
    				{
    					$date_query = AviaHelper::add_date_query( $date_query, $params['date_filter_start'], $params['date_filter_end'], $params['date_filter_format'] );
    				}

    And here the same passage in postslider.php in 4.8.7, around line 1131 :

    				$date_query = AviaHelper::date_query( array(), $params );
    

    But apparently, jut replacing one with the other is not enough to make it work again.

    Could you help ?

    Thanks !

    #1326982

    Hi,

    Thank you for the inquiry.

    How can we reproduce the issue? Where did you apply the pu-link class name? We cannot find any errors with the lightbox but there seems to be an issue coming from a custom script.

    buttontoclick.addEventListener('click', paginationnavwrap);
    buttontoclick.addEventListener('click', paginationarialabels2);
    buttontoclick.addEventListener('click', runTwo);
    

    Where did you add it?

    Best regards,
    Ismael

    #1326990

    Hi,
    Sorry, as I’ve said, I don’t think the problem is due to the “pu-link” class and the associated script, but with the Blog Articles avia element with the ‘Filter by date’ setting.
    On the pages that are showing the critical error, if you change this settings in the relevant avia block, the problem goes away. I’ll give you access in private so you can check it out.

    The custom script you’re referring to is for adding aria-labels to the pagination links of the accessible version of the document library (when you click on ‘Mediatheque’, then on the button that says ‘Contenu alternatif’, it’s the pagination links at the bottom of the popup). This script is not active on the pages where the critical error happens ; what kind of issue did you notice with this one ?

    #1326992

    Ah, sorry, the error you saw with the custom script is because the test site didn’t have the last version of it that makes it not activate on pages where it shouldn’t. That has been corrected.
    The main issue still remains, though, as you can see.

    #1327911

    Hi,

    We would like to apologize for the late response. Are you sure that there are existing posts within the selected start date to the end, or within the selected time frame? Looks like there is an issue with the date picker itself. The field doesn’t reflect the correct value after selecting a date.

    Screenshot: https://imgur.com/dhSryaq

    We cannot reproduce the same issue on our end, so this is probably caused by a plugin or a custom script. Is there a staging or development version of the site?

    This is a screenshot from our own installation.

    Screenshot: https://imgur.com/LtLSbmh

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.