[resolved] Incompatibility with Smart Archives Reloaded plugin (3 posts)

  1. cilya
    Posted 3 years ago #

    It seems this plugin has compatibility issues with the Smart Archives Reloaded plugin.

    When both plugins are activated and set up, the Archives, regardless of the plugin config, isn't displayed and a php error pops up (with debug set as "true"), which points toward the Groups plugin :

    Notice: Undefined property: stdClass::$ID in /home/cilia.pro/www/wp-content/plugins/groups/lib/access/class-groups-post-access.php on line 89

    Any hints as to how to fix this ?

    nb : i'm also writing a post in the Smart Archives Reloaded support forum.


  2. itthinx
    Plugin Author

    Posted 3 years ago #

    What happens is that Groups' filter in Groups_Post_Access hooked on the_posts receives an array of assumed posts that aren't really posts, and the entries are missing their IDs which then causes the Notice to be thrown out.

    Someone please correct me if I'm wrong, but the_posts is supposed to receive an array of valid post objects, right? Or should filters hooked on the_posts armor themselves against arbitrary entries like such without an ID?

    I would like to keep conditionals in that filter to an absolute minimum and I assume that a precondition to when the filter is invoked is that the objects it receives have an ID. I will close the issue for now but if I'm wrong please reopen and the additional check for ID would be added.

  3. GhostMaster
    Posted 3 years ago #

    Whats the fix?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Groups
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic