Multiple Issues Installing with Composer

gavinang
Forums
Hi, I'm having a nightmare time trying to install Opigno on my AWS Linux server. I have installed it multiple times with no success. Problem #1: Composer running out of memory. Solution: $ php -d memory_limit=-1 ./composer.phar create-project opigno/opigno-composer op Problem #2: In the verification check, module Ggroups is not found. Solution: In modules/contrib/groups, $ git apply ~/port-subgroups-2736233-261.patch There were a bunch of other patches that were skipped during the composer process for some reason, the most important (I think) being core patches 2898635-27.patch and 2924061-14.patch. However, when I run those 2 patches in the core directory, I get the following output: [ec2-user@ip-172-31-21-233 core]$ git apply ~/2898635-27.patch error: core/modules/views/src/EntityViewsData.php: No such file or directory error: core/modules/views/views.views.inc: No such file or directory [ec2-user@ip-172-31-21-233 core]$ git apply ~/2924061-14.patch error: core/modules/datetime/datetime.views.inc: No such file or directory error: core/modules/datetime/src/Plugin/views/argument/Date.php: No such file or directory error: core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php: No such file or directory error: core/modules/datetime_range/datetime_range.views.inc: No such file or directory I checked the files and they are actually there, but not sure why git is complaining. However, I was still able to carry on to create the DB etc. After the final step, I get: The website encountered an unexpected error. Please try again later. In the httpd error_log, there is this error: Error: Call to a member function getGranularity() on bool in /var/www/html/op/web/modules/contrib/calendar/src/Plugin/views/area/CalendarHeader.php on line 67 #0 /var/www/html/op/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2268): Drupal\calendar\Plugin\views\area\CalendarHeader->render(true)\n#1 /var/www/html/op/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2213): Drupal\views\Plugin\views\display\DisplayPluginBase->renderArea('header', true)\n#2 [internal function]: Drupal\views\Plugin\views\display\DisplayPluginBase->elementPreRender(Array)\n#3 /var/www/html/op/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)\n#4 /var/www/html/op/web/core/lib/Drupal/Core/Render/Renderer.php(781): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'silenced_deprec...', 'Drupal\\Core\\Ren...')\n#5 /var/www/html/op/web/core/lib/Drupal/Core/Render/Renderer.php(372): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)\n#6 /var/www/html/op/web/core/lib/Drupal/Core/Render/Renderer.php(444): Drupal\Core\Render\Renderer->doRender(Array)\n#7 /var/www/html/op/web/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false)\n#8 /var/www/html/op/web/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array)\n#9 /var/www/html/op/web/sites/default/files/php/twig/5e44b315cb65e_block.html.twig_CatA333jX4zFmuLBRywxOJECi/Vkc_CujMU5BBOuReXdwZbl1w7fkGhXRDEjTqFaoonkM.php(91): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, ........ I tried using drush to remove the calendar module, but then I get a different error saying something about a route to calendar module is not found. PHP version is 7.3 Hope someone can help me get it up and running.
asikuy

Multiple Issues Installing with Composer

#1 Make the memory limit 4. Now that means your server needs that much physical memory.

#2. With AWS make sure the proper ports are open...

gavinang

That didn't help very much.

That didn't help very much. 1. I made the memory unlimited and solved that problem. 2. I can access the web page via port 80 to go through the verification etc. Just that after the final steps it doesn't work. I bothered to give a detailed explanation and log of the issues I encountered so that hopefully someone can read and point me in the correct direction.
gavinang

Thanks. Installing without

Thanks. Installing without composer works
drupauler

Problems installing under composer

I'm having much the same problems installing under composer using Acquia Dev Desktop V2. Set memory and script runtimes to max but patches below fail and on firing up the site see error Required modules Required modules not found. The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as /modules. Missing modules: Ggroup Install following the non-composer route seems to work but as I normally apply maintenance, update drupal core etc. via Composer would like to get that route working before progressing. Help please! --------------------------- - Applying patches for drupal/core https://www.drupal.org/files/issues/2019-04-15/2924061-14.patch (2924061) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-04-15/2924061-14.patch https://www.drupal.org/files/issues/2019-12-15/2898635-27.patch (2898635) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-12-15/2898635-27.patch - Applying patches for drupal/entity_browser https://www.drupal.org/files/issues/2020-01-17/entity_browser-opigno_paginagion_view-3087176-4.patch (Fix pagination in view) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-01-17/entity_browser-opigno_paginagion_view-3087176-4.patch - Applying patches for drupal/group https://www.drupal.org/files/issues/2019-08-23/port-subgroups-2736233-261.patch (2736233) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-08-23/port-subgroups-2736233-261.patch https://www.drupal.org/files/issues/2018-05-15/group-2973005-2.patch (2973005) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-05-15/group-2973005-2.patch - Applying patches for drupal/h5p https://www.drupal.org/files/issues/2019-07-09/opigno-module-h5p-hidetitle-3018798-6.patch (3018798) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-07-09/opigno-module-h5p-hidetitle-3018798-6.patch - Applying patches for drupal/ckeditor_bgimage https://www.drupal.org/files/issues/2020-01-21/ckeditor_bgimage-opigno_certificate-3107667-2.patch (Fix saving params and updating popup dialog for ckeditor_bgimage) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-01-21/ckeditor_bgimage-opigno_certificate-3107667-2.patch - Applying patches for drupal/multiselect https://www.drupal.org/files/issues/2018-10-31/multiselect-javascript_settings_missing-3009259-3.patch (Missing javascript settings) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-10-31/multiselect-javascript_settings_missing-3009259-3.patch - Applying patches for drupal/private_message https://www.drupal.org/files/issues/2018-07-03/private-message-2961332-2.0.patch (2961332) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-07-03/private-message-2961332-2.0.patch - Applying patches for drupal/video https://www.drupal.org/files/issues/2018-07-18/2986682-2.patch (Add source and destination module for migrate plugin) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-07-18/2986682-2.patch - Applying patches for drupal/entity_print https://www.drupal.org/files/issues/2018-05-03/entity_print-dompdf-2969184.patch (2969184) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-05-03/entity_print-dompdf-2969184.patch
Anaconda

I am having problem with composer installation

On Virtual Machine (Hetzner or EC2 AWS) Debian 10 Nginx: When installing with composer, everything looks to go fine, but the main page background image is not visible. The folder in the files/styles/ is not created during installation. Also it is not possible to change the main page image from the theme settings page, because there is no that folder. The site on the other hand, works fine and I do not see any other problem. There still might be some problems. On localhost, on my laptop, Ubuntu 18.04, Nginx: Installing with composer works and the main page background image is visible, the folders are created. I would like to know what could be the reason, during installation on VM it does not give any errors. Is there some special permissions which should be given to the folder where composer installs the site? Does anyone else have same problem? For the install folder I am using the default /var/www/html/ where I run the composer command which creates the "opigno-composer" folder.
admin

Hi drupauler,

Hi drupauler,

None of the patches seem to be applying, so most probably the patch command is not installed on the server.

Try running patch in the command line to confirm its available, otherwise run in verbose mode to check why the patches are not applying.

The group sub module missing error is there because its added via a patch.

 

Best regards

admin

Hi Anaconda,

Hi Anaconda,

In drupal the files/styles are not created until they are needed/used for the first time.

So i would say there is no issue with the installation, it think the only issue is that the webserver user does not have permissions to write there. You should take a look at /files folder ownership/group permissions. Each time an image style is used, and its not available drupal will try creating it again, so and soon as you fix the folder permission issue it should work fine.

 

 

Best regards

Anaconda

Hi,

Hi, Thanks for quick reply. I know that those folders are created, but this time they just wont appear. On a normal drupal 8 installation those folders are created, on same system. After installation, I log in to Opigno LMS and look "recent log messages" and see this; domain.com/core/install.php?profile=opigno_lms&langcode=en&id=1&op=start Missing text format: basic_html. maybe that is related
Anaconda

Changed the folder 777 and www-data:www-data

even changed the folder permissions 777 and www-data:www-data and then going to theme settings and saving a new background image, it does not create any folder anywhere. I think the theme is broken.
admin

Hi Anaconda,

Hi Anaconda, And what message do you get in the logs after you upload a new background image? If you go to admin/config/media/file-system, if you set all the folders listed there as 0777, you still have the same issue? Best regards
Anaconda

Hi,

Hi, I do not see any recent log messages related when I upload a new image from the theme settings, it just uploads the "thumb" image to the root of the files/styles but then there is nothing else and the image is not found. Yes I still have that issue even the permissions are 777. It has something to do with my server. EDIT: okey, got it working, the reson was this script in my NGINX settings which prevented the Opigno theme for creating that folder for the theme background image: location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log /dev/null; add_header Cache-Control "public"; }
asikuy

AWS + Opigno

When I tried using AWS, it was a headache. I went to DigitalOcean, used Ubuntu 18.x and it installed with no hick ups. AWS is just too convoluted. too many layers where something is not set up correctly. And it only costs me $20 bucks a month.
Anaconda

I have been using AWS for 6

I have been using AWS for 6 years. Yes, it might be expensive if you don't know how to use it, but it has the best features of all cloud providers. But if you don't need AWS level stuff, I recommend Hetzner, that is really super price per dollar.
asikuy

AWS

The learning curb for AWS is at least 1 year. Now, if you hire a AWS architect, Yes, AWS is awesome. But you if you are jack of all trades, like me, then it can be months before you get started.