Git Product home page Git Product logo

Comments (14)

LukeTowers avatar LukeTowers commented on August 21, 2024 1

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.

from googleanalytics-plugin.

Daugirdas avatar Daugirdas commented on August 21, 2024

You need to install Google APIs Client Library for PHP

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

How did you install the plugin?

@Daugirdas it should have installed the lib automatically.

from googleanalytics-plugin.

woodinteractive avatar woodinteractive commented on August 21, 2024

@ametad some problem here. Ran the Client Library install. No change.
screen shot 2017-08-09 at 7 32 41 pm

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

@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:

$ php artisan plugin:install rainlab.googleanalytics

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.

from googleanalytics-plugin.

Daugirdas avatar Daugirdas commented on August 21, 2024

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
composer require google/apiclient:^2.0
That's it.

from googleanalytics-plugin.

 avatar commented on August 21, 2024

@ametad I installed the plugin with the october backend installer...
to solve that problem, I copied composer.json from the google analytics plugin repository
into the google analytics plugin (because the file was missing), then I ran composer update from project root

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

@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.

from googleanalytics-plugin.

 avatar commented on August 21, 2024

@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...

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

What is the difference between your local and production? I think there lies the answer to your problems...

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

Hmm... The last install I did was about three month ago, no problems then.
But now I have this problem too of the missing Google_Client Class!

I did:

  • a clean install of October build 419
  • then installed this plugin
  • configured the settings
  • added an analytics widget to the dashboard

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
But this vendor map is not there anymore on a clean install...

So what is going on here?

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

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?!

from googleanalytics-plugin.

ametad avatar ametad commented on August 21, 2024

https://stackoverflow.com/questions/45622700

Answer is that the vendor map in the plugins folder should be there.

from googleanalytics-plugin.

LukeTowers avatar LukeTowers commented on August 21, 2024

This should be fixed now that the marketplace has rebuilt the plugin for the last version release.

from googleanalytics-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.