New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'Google_Client' not found #67
Comments
You need to install Google APIs Client Library for PHP |
How did you install the plugin? @Daugirdas it should have installed the lib automatically. |
@ametad some problem here. Ran the Client Library install. No change. |
@woodinteractive I am sorry, I don't understand what "Client Library install" means. Could you explain? When you install this plugin through the backend in OctoberCMS or on the command line with:
Then the dependencies are installed also. It will NOT work when you just copy the files from this repository in your plugins/ directory. Because the dependencies must be retrieved in the installation process. |
Dependencies are other OctoberCMS plugins. Google APIs Client Library for PHP is not. To install follow instructions on github. I personally installed it in app root folder with |
@ametad I installed the plugin with the october backend installer... |
@dunets You did install it with the backend... well that is strange(!) it didnot install the composer dependencies. Because that is the way it works normally. This could be a bug. |
@ametad yes on my local development everything works well, but not on a production server... I need to install many things manually with composer and I have bugs like that... |
What is the difference between your local and production? I think there lies the answer to your problems... |
Hmm... The last install I did was about three month ago, no problems then. I did:
The problem is indeed that for some reason the dependencies are not installed properly in this new installation. Unlike previous installations where the Google_Client class is just to be found! I am not sure what the problem is... because before, I have seen a 'vendor' map here: plugins/rainlab/googleanalytics/vendor So what is going on here? |
When I make a plugin and submit it to the OC Market, it is without vendor map (and with composer.json). But when this plugin is installed on a october instance, the vendor map has been included in the folder where the plugin resides. I must admit; I don't know exactly how this vendor map in the plugin's directory has got there?! |
https://stackoverflow.com/questions/45622700 Answer is that the vendor map in the plugins folder should be there. |
The octobercms.com marketplace build process pulls in the plugin’s dependencies into a vendor directory under the plugin’s own directory and then removes composer.lock and composer.json from the package that gets generated. This is to support users that don’t use composer while also supporting users that use both marketplace plugins and composer-based plugins. If we left the composer.json in the plugin during the build process and then the user were to run composer update from the project root on that marketplace plugin, suddenly they would have duplicated dependencies which was causing a lot of issues. All of this to say: Don't include your vendor directory when submitting a plugin to the marketplace, the marketplace will take care of that. Do include your composer.json file though. In regards to RainLab.GoogleAnalytics, the build on the marketplace appears to be broken which means that it needs to be rebuilt on the marketplace. This could be triggered by pushing an update to the Github repository, which I haven't been able to until @ametad pointed out that adblockers occasionally cause problems with Github repositories. |
This should be fixed now that the marketplace has rebuilt the plugin for the last version release. |
An error
Class 'Google_Client' not found
appears on the dashboard, after adding statistics panel...Google Analytics version 1.2.1
October build 419
The text was updated successfully, but these errors were encountered: