• Resolved reasonx

    (@reasonx)


    Hi,

    we are using the free FooGallery Plugin and have encountered a bug in connection with another WordPress Plugin called “elasticpress”. This Plugin adds elasticsearch functionality within WordPress. As soon as both plugins are active an endless loop gets created somehow which leads to thousands of redundant “_foogallery_css” entries in the wp_postmeta table until the timeout happens.

    To confirm this is an issue of one of the both plugins we set up a fresh wordpress installation (latest version) with only the default wp theme active and no other plugins active except the two before mentioned (latest versions of course). The error occurs. So it has to be an issue of one of the both Plugins. Maybe you could help us with that. Of course we have also asked for Support on GitHub for the other Plugin.

    Additionally we have encountered issues that we wanted to share with you:

    1. On our main site, we currently have 7000+ FooGalleries active. If you want to add a gallery in the wordpress editor with the Button, it loads all the 7000+ Galleries and that takes forever of course. Unusable for us. The news editors have to write the shortcodes manually and therefore have to look up the gallery id in advance. That is unhandy.

    2. The “usage” Feature in the FooGallery Backend is not compatible with custom post types which is surprising. We have many custom post types and therefore the field “usage” displays “Not in use” for most of the galleries except for the ones with post_type post of course. We have looked up the code for it in your plugin and saw that you only support the post_type “post”. Maybe you can add Support for custom post types in the future. That would be great.

    Thank you very much for your attention.
    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author bradvin

    (@bradvin)

    hi

    I have installed ElasticPress but it requires an account with a 3rd party site to get it working. I will contact the developers to see if I can get a test account setup to replicate your issue.

    As for your other requests… others have asked for similar, so I will start working on those now that the video update has finally been released (6 months in the making)

    Thread Starter reasonx

    (@reasonx)

    Hi,

    thank you very much for the fast response. We appreciate that. In the meantime we have tracked down or at least delimited the problem in the code. Please keep in mind that this behavior is only reproduced when both plugins are active.

    1. foogallery/includes/admin/class-admin-css-load-optimizer.php line 49

    if ( false !== ( $css_location = $this->_locator->locate_file( "gallery-{$template}.css" ) ) )

    This check returns false ALWAYS. Therefore the following post_meta entry is never performed.

    2. foogallery/includes/public/class-css-load-optimizer.php line 117

    if ( is_array( $enqueued_foogallery_styles ) && ! array_key_exists( $style_handle, $enqueued_foogallery_styles ) )

    This check does not seem to be enough because the following add_post_meta() is performed over and over again until the timeout which leads to thousands of entires in the DB. The loop is somehow created by elasticpress. They hooked a sync method on the “added_post_meta” Hook which gets triggered every time. You can look up the method in elasticpress/classes/class-ep-sync-manager.php on line 94 or the add_action on line 45 in the same file.

    Essentially this method fills an array which is later evaluated in a foreach loop.

    Whatever the problem is in detail, we have fixed it for now by removing the “add_post_meta()” in the class-css-load-optimizer.php on line 127. Of course, if we want to update the Plugin, the changes are gone so we hope it gets fixed in future versions 🙂

    Best regards

    Plugin Author bradvin

    (@bradvin)

    hi again,

    The good folks at 10up gave me a free trial with their service, and I managed to resolve the conflict with ElasticPress, so the site does not go into an infinite loop.

    You can test this out from the develop branch : https://github.com/fooplugins/foogallery/tree/develop

    It will be included in the next release

    Thread Starter reasonx

    (@reasonx)

    Hi,

    that´s awesome!! Thank you very much for your effort. We didn´t expect this support request to be solved so well and so fast. We appreciate that and we take this into account for the purchase of the pro version we will do in the near future.

    Best regards,
    Arvid

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

The topic ‘Problems with Plugin “elasticpress”’ is closed to new replies.