Google API PHP client / Simple Calendar plugin / Composer autloading conflict

Posted · Add Comment

Scheduler Forums BirchPress Scheduler Google API PHP client / Simple Calendar plugin / Composer autloading conflict

This topic contains 6 replies, has 4 voices, and was last updated by  Andy Waller 7 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24528

    Phil Derksen
    Participant

    Hi there,

    Developer of Simple Calendar (a Google Calendar plugin) here. See https://wordpress.org/plugins/google-calendar-events/

    A mutual user of ours discovered that activating both our plugins will take down a site with a bunch of PHP errors. I confirmed in a test.

    Taking a look at your code, we both use Composer autoloading to bring in PHP libraries.

    However, we include the Google PHP API client, and it appears you do not. But you DO reference it.

    Take a look in /lib/vendor/composer/autoload_classmap.php of the latest version of your plugin, or do a search for “/google/apiclient/” in your code.

    If there’s something we should add to our code we’re more than happy to. Just submit a PR or open an issue at https://github.com/moonstonemedia/Simple-Calendar.

    Thanks,
    Phil

    #24588

    Luke
    Keymaster

    Hi Phil,

    Thanks for reporting this issue. Actually it is only required in the business editor or above.
    We found that Google API lib registered the autoloader function without checking if it existed. So We decide to include the google api lib manually. This will resolve the conflict with the plugins using this lib too. We will send our customer the new package. You don’t need to do anything on your side.

    Luke

    #24589

    Phil Derksen
    Participant

    Thanks Luke!

    If you need exact customer info email me at phil AT simplecalendar.io.

    Cheers,
    Phil

    #24590

    Luke
    Keymaster

    Our customer has submitted a ticket regarding this issue. Thank you anyway!

    #27141

    Andy Waller
    Participant

    I’m having this same issue. How can I get the fix?

    #27155

    Jennifer
    Keymaster

    Hi Andy,

    This conflict has been solved in the latest release. Which version are you using?

    #27889

    Andy Waller
    Participant

    I’m using BirchPress Scheduler Business Plus version 2.9.14.

    When I try to activate Simple Calendar (latest version, 3.1.9) I get a fatal error message:

    Fatal error: Cannot redeclare google_api_php_client_autoload() (previously declared in /home/…/wp-content/plugins/google-calendar-events/vendor/google/apiclient/src/Google/autoload.php:18) in /home/…/wp-content/plugins/birchschedule/lib/vendor/google/apiclient/autoload.php on line 31

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘BirchPress Scheduler’ is closed to new topics and replies.

Comments are closed.