Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved installing Drupal 9 fails

    LAMP
    4
    7
    280
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • luckow
      luckow translator last edited by

      Anyone else with this problem?
      I've tried it via drupal.tgz and composer. Both installations ended up with The website encountered an unexpected error. Please try again later. and nothing useful in the logs.

      Pronouns: he/him | Primary language: German

      scooke 1 Reply Last reply Reply Quote 0
      • luckow
        luckow translator last edited by

        Here is my workaround for the Drupal 9.1.4 installation on the Cloudron LAMP app (Paket v1.4.0-1).

        • Install the LAMP app on your Cloudron
        • Update the app ressources to minimal 1.5 GB RAM
        • open the terminal
        • switch to the www-data user su www-data
        • change directory to /app/data cd /app/data
        • install drupal via composer composer create-project drupal/recommended-project
        • move everything from inside recommended-project into the root of /app/data mv recommended-project/* . & mv recommended-project/.* .
        • remove the default public folder and make a symbolic link rm -rf public& ln -s web public
        • open your browser and install drupal
        • the last submit ends with an error
        • in the terminal install drush via composer composer require drush/drush
        • clear the cache php vendor/bin/drush cr
        • open your drupal installation again. #yippie

        Maybe there is an unknown error in the drupal installation process or something between mysql/drupal/cloudron. No hints in the logfiles. But this workflow works for me.

        Pronouns: he/him | Primary language: German

        Shai 1 Reply Last reply Reply Quote 1
        • scooke
          scooke @luckow last edited by scooke

          @luckow I'll give it a whirl and let you know....

          I've uploaded the zip (Drupal-9.1.4.zip).
          Then I just went to the url.
          Had an immediate error: The directory sites/default/files does not exist, so I made it, as well as the copying the missing settings.php.
          I then had to change ownership of the files directory, recursively.
          Then the changes were recognized by the web installer and I went to the next step.
          I entered the MySQL info from the LAMP-provided info, and the next install step started.
          I was then brought to the Configure Site page, entered all the details, pressed ok... and

          The same message you received!

          So, I thought I could trick myself into the site and so I appended an admin url to my domain, /admin/config/system/site-information, and what do you know, my site's admin page loaded.

          Interestingly, none of my details which I entered in the Configure Site page were displayed, and the home page was actually https://mydomain/node, so I removed the /node.

          I then tried to visit the root domain but got a new url, https://mydomain.com/user/1, so something is still out of wack.

          I then shortened the admin url to just /admin, and that page loaded. In fact, I could change the theme, and do a bunch of stuff, so Drupal is installed. It might be a permissions thing, so I am going to post this for now while I look around more.

          OK, my site is now working. Unfortunately I did a few steps, any of which may have done the trick.

          Going in reverse:

          Someone at https://www.drupal.org/forum/support/post-installation/2016-12-06/the-website-encountered-an-unexpected-error-please-try suggested appending /update.php to the root domain as a means to trigger some kind of refresh or update. I did it, and it seemed it was basically a database update. Once it was finished, my site was accessible.

          However, before that I hand-tweaked the settings.php file, and activated a few settings:

          1. #$settings['config_sync_directory'] = '/some/directory/you-chose was like this, so I removed the # and added the actual config sync directory. Seemed important.

          2. I removed the # from $settings['allow_authorize_operations'] = TRUE;

          3. I removed the # from $settings['file_public_path'] = 'sites/default/files';

          Any or all of these steps might have done the trick, but I only restarted the app and checked if it was loading after adding /update.php to the domain, https://mydomain.com/.

          For what it's worth, I tried restarting the app several times from the Dashboard, but strangely enough I couldn't tell if it had or not. After I had edited those 3 above, and before I added /update.php I had restarted the app from within apps File Manager window - there are three horizontal dots beside "UPLOAD" which give you three options, one of which is Restart App. I restarted the app from there and there was an immediate header at the top of the browser window telling me the app was restarting. Maybe it hadn't before.

          Drupal voodoo.

          A life lived in fear is a life half-lived

          luckow 1 Reply Last reply Reply Quote 2
          • luckow
            luckow translator @scooke last edited by

            @scooke Thank you for trying the Drupal installation. Some of your experiences are "normal", but most of them are not a typical Drupal experience 🙂
            I will give the installation another chance tomorrow.

            Pronouns: he/him | Primary language: German

            scooke 1 Reply Last reply Reply Quote 0
            • scooke
              scooke @luckow last edited by

              @luckow But my site IS loading and working! (After receiving the same error message as yours.)

              A life lived in fear is a life half-lived

              1 Reply Last reply Reply Quote 0
              • luckow
                luckow translator last edited by

                Here is my workaround for the Drupal 9.1.4 installation on the Cloudron LAMP app (Paket v1.4.0-1).

                • Install the LAMP app on your Cloudron
                • Update the app ressources to minimal 1.5 GB RAM
                • open the terminal
                • switch to the www-data user su www-data
                • change directory to /app/data cd /app/data
                • install drupal via composer composer create-project drupal/recommended-project
                • move everything from inside recommended-project into the root of /app/data mv recommended-project/* . & mv recommended-project/.* .
                • remove the default public folder and make a symbolic link rm -rf public& ln -s web public
                • open your browser and install drupal
                • the last submit ends with an error
                • in the terminal install drush via composer composer require drush/drush
                • clear the cache php vendor/bin/drush cr
                • open your drupal installation again. #yippie

                Maybe there is an unknown error in the drupal installation process or something between mysql/drupal/cloudron. No hints in the logfiles. But this workflow works for me.

                Pronouns: he/him | Primary language: German

                Shai 1 Reply Last reply Reply Quote 1
                • Shai
                  Shai @luckow last edited by Shai

                  @luckow => here is my slight riff on your great work.

                  I don't like composer.json and composer.lock to be at the cloudron data root /app/data

                  So I removed this bullet from the instruction:

                  * move everything from inside recommended-project into the root of /app/data
                  mv recommended-project/* . & mv recommended-project/.* .

                  And then I changed
                  rm -rf public & ln -s web public
                  to
                  rm -rf public & ln -s recommended-project/web public

                  I find it much easier to manage version control this way.

                  Your pioneering work made it so much easier for me. Thanks.

                  L 1 Reply Last reply Reply Quote 4
                  • L
                    LoudLemur @Shai last edited by

                    @shai

                    What is the latest on deploying Drupal using Cloudron everybody?

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Powered by NodeBB