Composer install of Elgg 2.1.1 installed only 3 plugins with other plugins missing


I decided to try out the Composer. Or rather installing Elgg 2.1.1 with the Composer. So far it is "Compose & Cry" which is normal, as it is the first try...

I installed the Composer, installed the Git, created a Github token and finally run the composer to install the Elgg.

When I configured the site, I have noticed that I had a lot of "cannot start and has been deactivated. Reason: Cannot include start.php for plugin" errors for the plugins. When I checked, there were only 3 plugins in the settings/plugins and respectively only three plugin directories (code_review, data_views, login_as). 

Was I supposed to modify the Composer.json to manually place those plugins? I don't think so but asking just in case...

What have I done wrong? 


  • git clone install-dir
    cd install-dir
    git remote add upstream
    git fetch upstream
    git reset --hard upstream/2.1 #or whatever branch
    composer install --no-dev --prefer-dist --optimize-autoloader

    This only makes sense if you want to contribute back to Elgg. If you just want to install Elgg with composer, follow the instructions here:

    composer global require "fxp/composer-asset-plugin:~1.1.1"
    mkdir install-dir
    composer create-project elgg/starter-project:dev-master install-dir


  • Thank you very much for your reply İsmayil,

    I have noticed that your instructions (second part) are slightly different than the area which made me to discover that I had not placed the "." at the end of the "composer create-project..." command (the result was install directory created with the name "starter-project" and me having to rename it - I do not think it was the cause of my issues).

    I have cleaned all and reinstalled with your second set of instructions. The result is the same. Only those 3 plugins and the same error messages.

    I have noticed that the composer.json contents are:

      "type": "project",
      "name": "elgg/starter-project",
      "license": "MIT",
      "prefer-stable": true,
      "minimum-stability": "dev",
      "require": {
        "elgg/elgg": "2.*"
      "require-dev": {
        "srokap/code_review": "^1.0.5",
        "phpunit/phpunit": "^4.7"
      "scripts": {
        "post-install-cmd": "\\Elgg\\Composer\\PostInstall::execute",
        "post-package-update": "\\Elgg\\Composer\\PostUpdate::execute",
        "test": "phpunit"

    As far as the elgg plugins (regardless of bundled or not) are concerned, the composer.lock lists only those 3 plugins that I mentioned earlier. As far as I understand composer.lock lists the exact list and versions of the packages & their dependencies installed as opposed to the composer.json file which may give lower, upper version boundaries which may be installed.

    Am I missing something? Like, should I be adding all the plugin names to the "require" part of composer.json, delete the composer.lock, and run the composer update? It does not make sense but it is not clear what I am missing...


  • I think the composer installation isn't working as intended. I believe the core plugins should be linked from vendor/elgg/elgg/mod to the mod directory in the main install directory as part of the composer installation. I've tried that myself just now and it seems this parts hasn't been done for me either. The only 3 pluigns that turn up in install-dir/mod are the plugins that are not part of Elgg core but added via composer additionally.

    There's an open issue about composer install ( Maybe that's the reason it doesn't work at the moment.

    My suggestion: don't bother with the composer install. It works perfectly fine without.

  • Hi iionly. Good to hear that you can repeat the same problem. I was trying out the Composer. I shall stick to the installation via zip files. Thanks a lot for your feedback.


  • They should be symlinked. I don't really use the starter-project, so can't tell you for sure.

  • Just for information: I have re-installed the Elgg 2.1.1. But this time not via the Composer. I just used copy zip file and unzip method. And the result is fine.

    With the problems that I have had with the Composer:  Either I did something wrong during the installation or Composer configuration of the Elgg 2.1.1 package is wrong.


  • I've tried it once more with the composer install method. The problem seems to be that the post install script listed in composer.json does NOT get executed with

    composer create-project elgg/starter-project:dev-master install-dir

    I don't know if this is a known issue (and it's not possible otherwise) or if it worked before that the post-install-cmd script was executed already with "create-project" to also create the symlinks of the core plugins in install-dir/mod.

    Anyway, by doing a

    composer install

    after the "composer create-project ..." command the symlinks are created (I've not tried the Elgg install process itself but I think it would work as expected afterwards).

    Maybe it would make sense to update the install docs to mention the "composer install" if it's not a bug that the symlinks are not created without it.