Great project, thank you so much for sharing... but since I am new to D8, this might be my thumbest question ever... Why is the installation done in an additional /html/ folder? Some links do work (e.g. "Explore all events" at /html/de/community-events), others do no see the root destination properly and lead to a 404 (e.g. node/add/topic) because of the missing /html/. According to forums, the base_url parameter has been removed in Drupal 8.

Thank you so much:-)

Comments

mazze created an issue. See original summary.

ronaldtebrake’s picture

Hi Mazze,

Thanks for the kind words, love to hear you're using the project!
We are actually looking in to removing it from being in the /html/ directory.

The reason it is in there is because we just recently moved to a composer workflow, and with our automated testing and development workflow already in place it made our life easier. But it shouldn't make your life harder! So we are looking in to fixing this in our next release.

Let me know if this answers your question.

jaapjan’s picture

@mazze: could you provide some more information regarding the installation steps you took? E.g. did you use the composer template or did you download the tarball?

Anyway created a pullrequest for this which will hopefully make it next release and solve any issues:

https://github.com/goalgorilla/open_social/pull/52

mazze’s picture

Hi Jaapjan,

thank you so much for tackling the issue! As far as I remember, I did all the steps according to the manual.

  • install composer
  • install open social using the shell command on the project site
  • point the browser to the thissite.com/html/ directory (where the D8 has been moved to)
  • follow the normal Drupal installation process from here

I also tried to move the D8 files to the root folder prior to installation, but this did not work (well, I did not really expect it to work either;-)

Let me know if I can help you with more information. I am also happy to provide german translation, already sent you an e-Mail to the mentioned address.

Shaun Holt’s picture

Mazze,

What is happening when you install open social... where is it failing... what error are you getting?

mazze’s picture

Hi Shaun,

As said in #1, I did not get errors during installation, but when clicking throught the platform. Some of the links respect the /html/ prefix, some do not.

Shaun Holt’s picture

Mazze,

My apologies. I read it and my mind completely looked over it.

Shaun

jaapjan’s picture

Status: Active » Fixed

Hi Mazze,

We removed the installer-path configuration in the open_social profile as per https://github.com/goalgorilla/open_social/pull/52. This will be in the next release here on drupal.org as well. This configuration is not supposed to be in the install profile afaik. However, this will not completely fix your issue since the installer paths are also provided in the social_template you have been using.

The template is just a starting point for your own Open Social installation and we want to maintain some good guidelines and a decent configuration for most people. This may not completely suit everyone needs, but you are free to fork/clone the social_template and make the adjustments you need. Developers should maintain their own composer.json also for any additional dependencies (modules, themes or additional libraries) It is best practice to have the DRUPAL_ROOT in html (or docroot, public_html, etc.) but the rest of your dependencies (vendors) outside the public docroot for security reasons, see also this discussion: https://www.drupal.org/node/1672986

I suggest one of the following actions to solve this particular issue:

1. Create your own template, based on social_template, and change it to your needs so the installer-paths are configured to your docroot.

2. Change the DocumentRoot in your vhost to your html directory as per https://httpd.apache.org/docs/2.4/vhosts/examples.html

3. Run composer update after removing this part of the composer.json in your project:

        "installer-paths": {
            "html/core": [
                "drupal/core"
            ],
            "html/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "html/profiles/contrib/social": [
                "goalgorilla/open_social"
            ],
            "html/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "html/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/contrib/{$name}": [
                "type:drupal-drush"
            ]
        },

And then remove your html directory. Although you might need to manually move your sites/default/files and sites/default/settings.php to the new directory first! :-)

However option 1 or 2 would be the better solution in my opinion. If you would like to read more about Composer for Drupal, view this presentation:
https://docs.google.com/presentation/d/1gxcxT6o47xVrfsZ7ZSQKjBRT-gfE54A1...

mazze’s picture

Hi jaapjan,

thank you... unfortunately it does install Alpha 6 now when running
create-project goalgorilla/social_template:dev-master example.com --no-interaction

I remember having Alpha 7 installed using this string two weeks ago...!?

jaapjan’s picture

Good catch! It should install the latest (development) version. The composer.json indicates that it should install the latest version of branch 8.x-1.0 of open_social repository. Unfortunately during installation it indicates it as version alpha6. This version is not the actual installed version. I hope we can set this versioning properly in the composer.json once we have our beta version ready (hopefully end of this week).

mazze’s picture

Perfect, thank you!

It really is Alpha 6, also in backend's update manager, where update to Alpha 7 is recommended;-)

mazze’s picture

One very last question on this... does this problem also affect the .zip installation file on D.O? Is composer also needed there?

jaapjan’s picture

Unfortunately Composer is still needed for the .zip download from Drupal.org. See these steps: https://github.com/goalgorilla/drupal_social/wiki/Installing-and-updatin...

This particular issue regarding the installation path should be fixed for the .zip installation after we release beta1. Planned for next Monday. You will still need Composer for the beta1.

mazze’s picture

Perfect, thank you. The project itself does not have long lifespan, so upgradebility is not a key issue. Looking forward to Beta 1:-)

  • 373e2c5 committed on 8.x-1.x
    #2792543 by jaapjan: do not set any directory settings in composer.json...
mazze’s picture

Oh, we got an new release:-) Installed it, works perfectly so far. I am happy to test and provide more feedback over the next couple of days. Thank you so much for sharing this distribution.

kandrupaler’s picture

I still face this issue.

I just installed 8.x-1.0-beta2 fresh by following instructions on the distribution page (https://www.drupal.org/project/social). I've installed the files in http://localhost/opensocial so I've got to browse to http://localhost/opensocial/html (not desirable - please please please fix this!).

Additionally, I see the following problems in the site's homepage (I've installed the dummy content):

1. Usernames in home stream posts link to URLs like http://localhost/opensocial/html/core/install.php/user/6/stream. If I click, I get a page which displays "Open Social 8.x-1.0-beta2 Drupal already installed". Just to clarify, I mean the link to Michelle Clark in "Michelle Clark commented on content in the group Official Group Educational Assistance Association". Comments don't have this problem.

2. Group links in home stream posts link to URLs like http://localhost/opensocial/html/core/install.php/group/1/stream. To clarify, again, I mean the link to "Official Group Educational Assistance Association" in "Michelle Clark commented on content in the group Official Group Educational Assistance Association"

3. User menu links, the group icon, the + icon to add new content, all use the base-url as http://localhost/ instead of http://localhost/opensocial/html. I've added "RewriteBase /opensocial/html" to .htaccess in the html directory but it doesn't help.

4. If I navigate to a group's page, all the above problems exist, plus this: "All upcoming events" and "All newest topics" now have http://localhost/ as the base-url instead of http://localhost/opensocial/html. But the actual nodes and user links work fine. They link have http://localhost/opensocial/html as the base-url. Plus the tab-kind-of-things under the "cover pic" of the group work fine. The button to join the group, as well as the edit pen on the top right of the cover pic - both work fine, too.

Anyone else facing these issues, or have I configured my localhost wrongly?

kandrupaler’s picture

Status: Fixed » Active
kandrupaler’s picture

Okay, I was able to reproduce these issues on Platform.sh, too. So looks like we have a bug here.

ronaldtebrake’s picture

Status: Active » Fixed

Hi @kandrupaler, we consider this ticket fixed. And we can help you on your issues in the issue you opened at: https://www.drupal.org/node/2810015

Status: Fixed » Closed (fixed)

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

marty.true’s picture

Why is this marked 'fixed'? The issue topic is regarding the extra 'html' folder in the composer install and it was stated early on that this was going to be removed. So if it hasn't been removed, this issue should remain active.

I was led to this (seemingly awesome) distribution from the Drupal Newsletter, as the "Distro of the Week". With such a nice push from the Drupal newsletter, I'm wondering why this 4-6 month old issue, that was promised to be removed, is still not fixed/removed in the composer install, and it is marked 'fixed'.

ronaldtebrake’s picture

https://www.drupal.org/node/2792543#comment-11591981

Actually provides a fix where we removed all the installer path configuration from the distro's composer.json and comes up with an alternative if you're using our template. It also clearly explains the reason for a HTML folder in our workflow.

So we marked this as fixed, the issue has been resolved for the author and we committed the patch which landed in the distribution as per: http://cgit.drupalcode.org/social/commit/?id=373e2c5

Hope this is clear

sitordance’s picture

First, I'd like to say thanks for this great project.

Second, it took me about half a day to successfully install this project on a cPanel server (in the web root instead of /DIR or /html folder) but only after reading several tutorials then making a mental leap to combine info from this thread and another install tutorial.

In case this is useful to anyone else, this is how I successfully installed Drupal Open Social with Composer in the public_html folder on a cPanel server. I assume composer is already installed on your server.

1. Log into ssh as the user/admin for the site you are working on and cd to: /home/username
(this is the cpanel username for your domain)

2. Execute: wget https://raw.githubusercontent.com/goalgorilla/social_template/master/com...
(this copies composer.json to your account)

3. Edit composer.json with vi or some other program and modify all the "html/" entries by adding the following in front of them: public_

This tells composer that the Open Social files should be downloaded to / located in: /home/username/public_html and NOT /home/username/html

Relevant entries from my edited composer.json file:

---

"extra": {
"installer-paths": {
"public_html/core": [
"drupal/core"
],
"public_html/modules/contrib/{$name}": [
"type:drupal-module"
],
"public_html/profiles/contrib/social": [
"goalgorilla/open_social"
],
"public_html/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"public_html/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/contrib/{$name}": [
"type:drupal-drush"
]
},
"enable-patching": true
---

4. Save your changes and exit the file then execute: composer install
(this should be done from the /home/username directory)

5. After the download is completed, cd to the public_html directory. The relevant Drupal / Open Social files should be present in the web root (/home/username/public_html) and not in a DIR, html or some other directory.

6. Open your site (http://yoursite.com) in your browser and you should be able to complete your setup via the web.

When you are ready to upgrade, this should do the trick: composer update
(run from /home/username)

I hope this info is helpful to someone.

Note: Much of this info was obtained from: https://duvien.com/blog/how-install-open-social-drupal-8-distribution

Thanks

zorax’s picture

work's like a charm !
Thank's for sharing !

ugintl’s picture

Anyone using pantheon?

Can we use composer on pantheon?

colan’s picture

You can use Composer on Aegir.

ugintl’s picture

@colan Do you mean I should install aegir on pantheon? I do not know how to use aegir

ugintl’s picture

So it is a hosting over a hosting?

colan’s picture

#28: No, I'm suggesting that you could use Aegir instead of Pantheon because Aegir supports sites in subdirectories.

ugintl’s picture

Thank you, but I did not understand one thing. Aegir still needs to be installed on a web server like we install drupal. Correct?

drupallogic’s picture

hi,

I'm trying to see open social on my shared hosting. I had this html folder problem.

if I download all files to my PC and then upload to right folder via FTP, would it work?

not so technical guy.

+ I got this while trying to install under public_html/open/html

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /open/html/core/install.php?rewrite=ok&profile=social&langcode=tr&continue=1&id=3&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText: