I'm getting "Address module requirements) Not installed -- The Address module requires the commerceguys/zone library. For more information check our readme" when I attempt to install Open Social. I've specifically required drupal/address ~1.0, and have also specifically required the commerceguys dependencies (zone, addressing, intl, enum). At this point I'm stumped -- the /vendor/commerceguys directory exists with all the package files, so why isn't Open Social picking it up? Thanks!

Comments

beuner created an issue. See original summary.

jaapjan’s picture

If you are sure that the module and libraries are successfully installed you could try to comment/remove the lines in the social_verify_custom_requirements() function in social.profile.

Especially this part:

if (!class_exists('\CommerceGuys\Zone\Repository\ZoneRepository')) {
    $requirements['addressing_library_zone'] = [
      'title' => t('Address module requirements)'),
      'value' => t('Not installed'),
      'description' => t('The Address module requires the commerceguys/zone library. <a href=":link" target="_blank">For more information check our readme</a>', array(':link' => 'https://github.com/goalgorilla/drupal_social/blob/master/readme.md#install-from-project-page-on-drupalorg')),
      'severity' => REQUIREMENT_ERROR,
    ];
  }

Could you try that and let me know if:
- That solves your issue?
- Installation was successful after the change?

Also it would be helpful to know how you installed Open Social. With the Composer project template or download from drupal.org?

I think in any case we should make this code a bit more future-proof and retrieve the requirements from the address module (address.install => function address_requirements()) directly.

beunerd’s picture

Thanks for the quick help! I'm thinking that this might have something to do with the serving the site on pantheon, actually. I just did a local install by downloading the tar from drupal.org and it's working fine for me. For the pantheon install I tried it several different ways (composer install locally, then migrate to pantheon; creating a site on pantheon and then replacing the files with the downloaded files from drupal.org; etc.) -- but each time encountered the same issue. Might just need to try a different host!

wtchan’s picture

I'd think your problem is specifically related with Open Social on Pantheon. I've just successfully installed one on Pantheon after repeated failures. A lot of times the initialization failed at the drupal/address or drupal/zone messages. The problem of Open Social on Pantheon not picking up the vendor/commerceguys libraries was probably related with some .git folders being commited and pushed to the Pantheon site. These .git folders were treated as git submodules but were not supported by Pantheon. The steps that made me successful are as follows:

1. follow half-way the Installing by Manually Pushing Up Code at https://pantheon.io/blog/using-composer-relocated-document-root-pantheon and stop before git add -A . ;
2. composer require "drupal/address ~1.0" [--prefer-dist] ;
The --prefer-dist was advised by others to prevent .git folder being loaded. However, it doesn't work here.
3. composer require "goalgorilla/open_social" ;
4. What I did after this was: find . -name ".git" . You'll notice that there are several .git folders under vendor/commerceguys and web/module/contrib/* folders.
5. remove all the .git folders found under vendor/ and web/ directories but not the .git folder at project root.
6. resume the rest of the steps suggested at https://pantheon.io/blog/using-composer-relocated-document-root-pantheon ;
7. return to your Pantheon site and change the git mode to SFTP mode ;
8. visit your newly created site and continue with the initialization steps.

Voila, you'll get your Open Social site on Pantheon. The same procedures can be applied to installing Drupal Commerce on Pantheon!

Hope this helps,

Wingo Chan

beunerd’s picture

That did it! Thank you so much! When you say "--prefer-dist" doesn't work here... are you referring just to drupal/address and its dependencies? I'll be sure to monitor those errant ".git" submodules/folders!

tankeroo’s picture

Just wanted to share this, in case it helps someone else. For those not taking a drush or primarily shell route.
I had the same issue doing a localhost install and took me a long while to figure it out.
I thought downloading the module and popping it into "vendor" or "libraries" would work.. but nope.

Download the Open Social project from: https://www.drupal.org/project/social
Unzip to pc.

bash/cmd into the root of this new folder.
Type the following two commands in shell/cmd:

Then, install through browser.

wtchan’s picture

+ beuner

Glad that it works. I've have rechecked the --prefer-dist for drupal/address. It worked also with no .git folders loaded. It was goalgorilla/open_social --prefer-dist that still had some .git folders being loaded in some drupal module dependencies. Any way, as you said, check everytime for .git folders before committing and pushing to Pantheon would save a lot of headaches.

lquessenberry’s picture

I have tried the methods listed here but I am hitting a road block every time. Does someone have a vanilla Repo of this completed that we might be able to take a look at?

lquessenberry’s picture

I get this every time.

Problem 1
- Conclusion: remove drupal/core 8.2.2
- Conclusion: don't install drupal/core 8.2.2
- goalgorilla/open_social 1.0.0-beta2 requires drupal/core 8.1.10 -> satisfiable by drupal/core[8.1.10].
- goalgorilla/open_social 1.0.0-beta1 requires drupal/core 8.1.8 -> satisfiable by drupal/core[8.1.8].
- goalgorilla/open_social 1.0.0-beta3 requires drupal/core 8.2.1 -> satisfiable by drupal/core[8.2.1].
- goalgorilla/open_social 1.0.0-beta4 requires drupal/core 8.2.1 -> satisfiable by drupal/core[8.2.1].
- goalgorilla/open_social 1.0.0-beta5 requires drupal/core 8.2.1 -> satisfiable by drupal/core[8.2.1].
- Can only install one of: drupal/core[8.1.10, 8.2.2].
- Can only install one of: drupal/core[8.1.8, 8.2.2].
- Can only install one of: drupal/core[8.2.1, 8.2.2].
- Installation request for drupal/core (locked at 8.2.2, required as ~8) -> satisfiable by drupal/core[8.2.2].
- Installation request for goalgorilla/open_social ^1.0@beta -> satisfiable by goalgorilla/open_social[1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5].

lordbarnhill’s picture

+lquessenberry If you get that error, instead of typing composer require "goalgorilla/open_social" in terminal, open the composer.json file and enter "goalgorilla/open_social": "~1.0" under require. Here is a snippet from my .json as an example:

  "require": {
    "composer/installers": "^1.0.20",
    "drupal-composer/drupal-scaffold": "^2.0.1",
    "cweagans/composer-patches": "~1.0",

    "drupal/core": "~8",

    "drupal/console": "^1.0.0-rc8",
    "drush/drush": "~8",
    "drupal/address": "~1.0",
    "goalgorilla/open_social": "~1.0"
  },

Save the file, then type composer update into terminal and let it finish. Once that is done, continue with the steps listed above. This works for the current verison, which is 1.0.0 beta5 as I write this.

lquessenberry’s picture

Thanks LordBarnhill for figuring out something so dead simple. If anyone is still interested, here is a public GIT repo of our working version.

https://github.com/lquessenberry/OpenSocialOnPantheon

jaapjan’s picture

Title: Address module requirements/dependencies problem preventing install » Installing Open Social on Pantheon
Status: Active » Fixed

Thanks everyone for the work on this issue! I've tested the public repository from +lquessenberry and it works like a charm. I had to install Open Social via terminus with this command since the UI installation did not work in GIT mode.

terminus drush 'si social -y'

I'm marking this issue as Fixed since Open Social seems to work on Pantheon now.

wtchan’s picture

I raised an issue at https://github.com/lquessenberry/OpenSocialOnPantheon a few days ago after following the steps there. I could install Open Social only if English was selected as the initial installation language. Any other languages selected would immediately say that Drupal has been installed. No further action could be done then.

jaapjan’s picture

Ok @wtchan. I created an issue here: #2832103: Installation error on Platform.sh/Pantheon when using non-English including a work-around which works for me at Platform.sh (not tested on Pantheon to be honest).

lquessenberry’s picture

@wtchan @jaapjan - I apologize for overlooking the issue raised on our open repo. I will refer people to the issue by @Jaapjan in #14. I may take a look at the other languages and see if we can fix it while I am at it.

lquessenberry’s picture

@wtchan I closed the issue and referred it to this thread and the one in #14. I also updated the README file to reflect this issue for newcomers.

https://github.com/lquessenberry/OpenSocialOnPantheon/blob/master/README.md

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.