Support » Plugin: Events Manager » Fancy Gallery issue when update Event Manager 5.3.7

Viewing 12 replies - 1 through 12 (of 12 total)
  • I was forced to downgrade to 5.3.6.1

    hi,

    sorry, haven’t tried that plugin before however will going to test this out. can I know what are the errors you get?

    thanks

    The problem persists with any jquery gallery plugin, including

    • Fancy Gallery Lite
    • FancyBox
    • Easy FancyBox
    • or

    • Shutter Reloaded

    It seems to be a js conflict… but I don’t know where to search. In 5.3.7 changelog, there are few references like:
    – fixed clashes with JetPack Tiled Galleries
    – fixed timthumb thumbnails issues with MultiSite and virtual links (if virtual link is “post_permalink/photo_permalink” this might be related also to WP galleries)

    Agelonwl, the gallery plugin display the WP gallery with thumbnails and expand each image on click. When I installed EM5.3.7, the style of gallery was affected and the click on image didn’t work.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    try removing this snippet in classes/em-event.php

    does that help?

    /**
     * This function replaces the default gallery shortcode, so it can check if this is a recurring event recurrence and pass on the parent post id as the default post.
     * @param array $attr
     */
    function em_event_gallery_override( $attr = array() ){
    	global $post;
    	if( $post->post_type == EM_POST_TYPE_EVENT && empty($attr['id']) && empty($attr['ids']) ){
    		//no id specified, so check if it's recurring and override id with recurrence template post id
    		$EM_Event = em_get_event($post->ID, 'post_id');
    		if( $EM_Event->is_recurrence() ){
    			$attr['id'] = $EM_Event->get_event_recurrence()->post_id;
    		}
    	}
    	return gallery_shortcode($attr);
    }
    function em_event_gallery_override_init(){
    	remove_shortcode('gallery');
    	add_shortcode('gallery', 'em_event_gallery_override');
    }
    add_action('init','em_event_gallery_override_init', 1000); //so that plugins like JetPack don't think we're overriding gallery, we're not i swear!

    Thanks Marcus

    I had a custom [gallery] shortcode already in place, and EM broke it. NOw that I removed that snippet it is fixed.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    another more graceful solution would be to add something like this to your theme functions.php file, so you don’t need to do this on each plugin update.

    function my_em_disable_gallery(){
      remove_action('init','em_event_gallery_override_init', 1000);
    }
    add_action('plugins_loaded', 'my_em_disable_gallery');

    Hi Marcus,
    removing the snippet works for me,
    the second solution via function removing is not working.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    try chaging plugins_loaded to init in the snippet above, e.g.

    function my_em_disable_gallery(){
      remove_action('init','em_event_gallery_override_init', 1000);
    }
    add_action('init', 'my_em_disable_gallery');

    Thank you Marcus,
    it’s working with ‘init’.

    angelo_nwl

    (@angelo_nwl)

    NetWebLogic Support

    thanks for the updates.

    Thanks Marcus!! Same conflict with prettyPhoto in my theme and It’s work for me with ‘init’.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fancy Gallery issue when update Event Manager 5.3.7’ is closed to new replies.