I'm using the Dukt Twitter plugin which requires the Dukt OAuth plugin.

Both are working perfectly on both my local Dev environment and the remote Staging environment, but not on the Live site. Both plugins install with no errors or problems. Configuring the OAuth plugin (for Twitter only) is fine as well - it accepts the keys/credentials generated from the Twitter API Management Console and shows as "configured" on it's status screen.

However, when I then go to the actual Twitter plugin config and hit the "Connect to Twitter" button, I get this error message:

Fatal error: Class 'League\OAuth1\Client\Server\Twitter' not found in /webserver/domains/[CLIENT]/live/craft/plugins/oauth/providers/Twitter.php on line 46

Anyone have any idea what this error message means?

I suspect it's more to do with the server or site config than the actual plugin but I'm not sure where to start looking as I don't understand why it can't find that namespace

  • 1
    It looks like a file is missing, How are you copying the files to your live server? If your sure than maybe try deleting the vendor directory in the oauth plugin folder, adding this composer.json file: github.com/dukt/craft-oauth/blob/master/Source/composer.json and running composer install , that way you know for sure all the vendor files are there Aug 17 '15 at 21:38
  • 1
    Yeah I think you might just be missing some files. When you download those plugins from GitHub, you're actually only downloading the source and have to build them before they work (as described by Alec). When you download them from dukt.net, the plugins are built and ready to install. Try to do a fresh download/install of both plugins and you should be good to go. Aug 18 '15 at 12:05

It was indeed missing files, as suggested by Alec and Benjamin. All down to some non-specific .gitignore rules that meant it was ignoring all "src" folders - which is one of the folders created by the composer install

Thanks for your help guys!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.