Title: Function error in new version
Last modified: August 30, 2016

---

# Function error in new version

 *  Resolved [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/)
 * Hi,
 * We’re using the Essentials Grid and Enhanced Media Library plugin.
 * It worked fine with version 2.0.4.8.
 * We then did an automate update of Enhanced Media Library to 2.1.2 today and we
   received the following error message when accessing the pages using the Essentials
   Grid shortcode:-
 * Warning: Missing argument 3 for wpuxss_eml_gallery_shortcode() in ~/wp-content/
   plugins/enhanced-media-library/core/gallery.php on line 21
 * We have reverted back to version 2.0.4.8 and all working fine.
 * I would appreciate if you could investigate.
 * Regards
    SteveB
 * [https://wordpress.org/plugins/enhanced-media-library/](https://wordpress.org/plugins/enhanced-media-library/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6856886)
 * Hi SteveB,
 * The Essentials Grid seems to be a premium plugin. Sorry, but it’s impossible 
   to obtain every premium plugins to check if it’s compatible with the EML. So 
   please help me a bit.
 * Please search if the Essentials Grid code contains something like
 * `apply_filters( 'post_gallery', '', $attr, $instance );`
 * The search string is actually
 * `apply_filters( 'post_gallery'`
 * Thank you!
 * -Nadia
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6856900)
 * Hi again,
 * I tested the issue as I understand it, and I believe that the Essentials Grid
   calls filter ‘post_gallery’ somewhere in its code without third parameter `$instance`.
 *     ```
       @since 4.2.0 The $instance parameter was added.
       @param int $instance Unique numeric ID of this gallery shortcode instance.
       ```
   
 * So replacing line 21
 * `function wpuxss_eml_gallery_shortcode( $output, $attr, $instance ) {`
 * with
 * `function wpuxss_eml_gallery_shortcode( $output, $attr, $instance = 0 ) {`
 * should solve the issue. Please try and let me know if it works for you.
 * Though! The correct usage of the `$instance` is important, I believe. If you 
   can contact Essentials Grid’ authors about this, it would be really nice of you!
 * -Nadia
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6856913)
 * I believe it’s fixed in v2.1.3 Please confirm.
 * Best,
    -Nadia
 *  Thread Starter [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6856940)
 * Hi Nadia,
 * I really appreciate your fast response and resolution to our issue.
 * I’ll test v2.1.3 today and get back to you to confirm.
 * Many thanks again – Great support
 *  Thread Starter [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857058)
 * Hi Nadia,
 * I’ve updated to v2.1.3 and I’m pleased to confirm all is working fine over the
   last few days.
 * Many thanks for your fast resolution and a great plugin and if I can be of any
   assistance in testing any future releases/updates please let me know.
 * Best Regards
    SteveB
 *  Thread Starter [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857085)
 * Hi Nadia,
 * I hope you can help me resolve my problem, and I hope you don’t mind me using
   the same support ticket but I’ve identified a further problem that appears to
   be with the ‘Enhanced Media Library’ plugin.
 * To confirm I’m using the following plugins:-
 * 1) Essentials Grid
    2) Lightbox Gallery 3) Enhanced Media Library 4) Gravity 
   Forms
 * At the time I tested v2.1.3 to ensure Essentials Grid loaded correctly.
    However
   I didn’t test the WordPress Lightbox Gallery.
 * I can confirm that when I click on a WordPress gallery item in a post the lightbox
   doesn’t function at all.
 * I was able to get the WordPress Lightbox to work by selecting the ‘Turn off enhanced
   gallery’ in your plugin.
 * If you require any further information please let me know.
 * Regards
    SteveB
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857090)
 * Hi SteveB,
 * Thank you for informing me about the issue and providing the media plugins list!
   The new version addressing the issue will be launched soon.
 * Best,
    -Nadia
 *  Thread Starter [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857091)
 * Hi Nadia,
 * Many thanks for the reply and prompt action.
 * If it helps I’m more than happy to assist with any testing.
 * Best Regards
    SteveB
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857103)
 * Hello SteveB,
 * To make EML work with Lightbox Gallery please read
 * [http://www.wpuxsolutions.com/documents/enhanced-media-library/enhanced-gallery-issues/#s5](http://www.wpuxsolutions.com/documents/enhanced-media-library/enhanced-gallery-issues/#s5)
 * I also can suggest you to try Simple Lightbox or Responsive Lightbox by dFactory
   that are compatible with EML without additional tricks.
 * Best,
    -Nadia
 * p.s. Please create new threads about new issues because it’s not that easy to
   find them in WP support system even for me, not to mention EML users 🙂
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857104)
 * Hello SteveB,
 * Please disregard all I posted about v2.1.4
 * To make EML and Lightbox Gallery works together, it needs a minor change described
   [here](http://www.wpuxsolutions.com/documents/enhanced-media-library/enhanced-gallery-possible-conflicts/#s2)
 * In line 518 it should to be:
 *     ```
       extract(shortcode_atts(array(
       		'order'      => 'ASC',
       		'orderby'    => 'menu_order ID',
       		'id'         => $post->ID,
       		'itemtag'    => $html5 ? 'figure'     : 'dl',
       		'icontag'    => $html5 ? 'div'        : 'dt',
       		'captiontag' => $html5 ? 'figcaption' : 'dd',
       		'columns'    => $columns,
       		'size'       => $size,
       		'include'    => '',
       		'exclude'    => '',
       		'lightboxsize' => $lightboxsize,
       		'meta'       => 'false',
       		'class'      => 'gallery1',
       		'nofollow'   => false,
       		'from'       => '',
       		'num'        => '',
       		'page'       => $page,
       		'before' => '<div class="gallery_pagenavi">' . __('Pages:'), 'after' => '</div>',
       		'link_before' => '', 'link_after' => '',
       		'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
       		'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'pagenavi' => 1
       	), $attr, 'gallery' ));
       ```
   
 * You can make the change to Lightbox Gallery’s code to make them compatible immediately.
 * I will inform plugin authors about this.
 * Best,
    -Nadia
 *  Thread Starter [pxwm](https://wordpress.org/support/users/pxwm/)
 * (@pxwm)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857113)
 * Hi Nadia,
 * I just wanted to check if I still need to make the changes as per your most recent
   post or could I just upgrade to v2.1.7 to fix my issue?
 * Regards
    SteveB
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857114)
 * Hi SteveB,
 * Actually, both. You have to update and to change the code of Lightbox Gallery.
 * We did all we could. I left the request on its support forum [https://wordpress.org/support/topic/compatibility-with-enhanced-media-library-1](https://wordpress.org/support/topic/compatibility-with-enhanced-media-library-1),
   will hope that when its authors update it again, they will make the change.
 * Best,
    -Nadia

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Function error in new version’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-media-library/assets/icon-256x256.png?rev=980107)
 * [Enhanced Media Library](https://wordpress.org/plugins/enhanced-media-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-media-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-media-library/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-media-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-media-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-media-library/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [webbistro](https://wordpress.org/support/users/webbistro/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/function-error-in-new-version/#post-6857114)
 * Status: resolved