WordPress.org

Forums

Events Manager
[resolved] Fancy Gallery issue when update Event Manager 5.3.7 (13 posts)

  1. thinkero
    Member
    Posted 2 years ago #

    Fancy Gallery had the ability to expand an thumbnail from wordpress gallery in a full image (over-layer) by click.

    The update of EM to 5.3.7 crushes Fancy Gallery maybe via an jQuery update. Has this happened to anyone? If so, did you find any solution?

    http://wordpress.org/extend/plugins/events-manager/

  2. thinkero
    Member
    Posted 2 years ago #

    I was forced to downgrade to 5.3.6.1

  3. agelonwl
    Member
    Posted 2 years ago #

    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

  4. thinkero
    Member
    Posted 2 years ago #

    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)

  5. thinkero
    Member
    Posted 2 years ago #

    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.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    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!
  7. Burke Ingraffia
    Member
    Posted 2 years ago #

    Thanks Marcus

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

  8. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    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');
  9. thinkero
    Member
    Posted 1 year ago #

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

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    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');
  11. thinkero
    Member
    Posted 1 year ago #

    Thank you Marcus,
    it's working with 'init'.

  12. angelo
    NetWebLogic Support
    Posted 1 year ago #

    thanks for the updates.

  13. dt_nords
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic