Account created on 18 August 2022, over 2 years ago
#

Recent comments

Thank you again, @aaron.ferris!

I installed crop and now I can select the Streaming Media Views checkbox!

Many thanks, Aaron.

I edited modules/streaming_media_views/streaming_media_views.info.yml, so this file now looks like this:

name: Streaming Media Views
description: 'A UI for Streaming by reusing Media and Views.'
package: Media
type: module
core_version_requirement: ^9 | ^10

libraries:
  - streaming_media_views/videojs

dependencies:
  - drupal:image
  - drupal:media
  - drupal:crop
  - drupal:user
  - drupal:streaming

However now, when I tried to enable both modules in Admin>Extend, I installed the first one, Streaming, but the Streaming Media Views checkbox is greyed out. Is it because it has "crop (missing)"?

Streaming
Streaming is a FFMpeg video streaming transcoder.
Machine name: streaming
Requires: PHP-FFMpeg
Required by: Streaming Media Views (disabled)

Streaming Media Views
A UI for Streaming by reusing Media and Views.
Machine name: streaming_media_views
Requires: Image, File, Field, Media, User, System, crop (missing), PHP-FFMpeg

Greetings!  Sorry for the late reply!

I hope to use this container to serve images, streaming videos, and H5P content in an academic environment.  I just found a suggested solution on another forum (theming - Upgrade to Drupal 10.1.6, Theme Doesn't Load Outside Maintenance Mode - Drupal Answers), which said:

======================================

Drupal 10.1.x introduced CSS and JavaScript aggregation performance improvements in that there is change to .htaccess file as well.

Sites using nginx/php-fpm may need to update their nginx.conf file to pass through the css/js path to Drupal.

======================================

My problem is that I'm supposed to edit a piece of nginx.conf file that deals with image and style generation, but I only have two very small copies of nginx.conf that dont have any mention of PHP at all. They are are a merged and diff versions of the same file at:

/var/lib/docker/overlay2/464cd198c9f1ece0e669690a0a61d353e1d3f8b457489ab24eee2f12c637aff3/merged/etc/nginx/nginx.conf /var/lib/docker/overlay2/ae457ff4ced0f9e2e384a51fc1fc502f299652899cf0bd5321b7777f2e7568c5/diff/etc/nginx/nginx.conf

I suppose I should be editing something else, but I cannot fathom what it is.  :(

I have since chown-ed the /var/www/html/ with its subdirectories back from mysername:mysername to www-data:www-data, but the error is still the same:

Warning: require(/var/www/html/drupal/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/drupal/autoload.php on line 16

Fatal error: Uncaught Error: Failed opening required '/var/www/html/drupal/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/drupal/autoload.php:16 Stack trace: #0 /var/www/html/drupal/index.php(18): require_once() #1 {main} thrown in /var/www/html/drupal/autoload.php on line 16

What should I do to fix this?  I am going to re-install Drupal using Docker in the next few days, after reading up on it, but that will be later, while I have the WSOD right now :(

Hi @ressa,

Not at all, I am planning to follow your advice and have been reading about Docker since yesterday! I will re-install using Docket this week. 

However, meanwhile, I would like to fix the WSoD first, so my colleagues don’t comment on the site being down :)

Hence, this call for help. 

If someone could give me a hint as to what to do next, I would be very grateful!

Thank you.  As suggested in the link you sent, I enabled error reporting in /var/www/html/drupal/index.php and now I see in the browser:

Warning: require(/var/www/html/drupal/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/drupal/autoload.php on line 16

Fatal error: Uncaught Error: Failed opening required '/var/www/html/drupal/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/drupal/autoload.php:16 Stack trace: #0 /var/www/html/drupal/index.php(18): require_once() #1 {main} thrown in /var/www/html/drupal/autoload.php on line 16

Since I have deleted drupal/vendor directory (and drupal/composer.json file) earlier, because I had them also in /var/www/html, it looks like some file is still waiting to see it at a wrong location.  The error says it " Failed opening required '/var/www/html/drupal/vendor/autoload.php'", but the autoload.php is now in /var/www/html/drupal/.  You can see both directoreis in the initial description of my problem above.

As instructed, I deleted

/var/www/html/drupal/composer.json

/var/www/html/drupal/vendor

and ran:

sudo chown -R $USER:$USER /var/www/html

So I didn't need to use sudo to run

composer require drush/drush

Hopefully, I'm all set on that front.  Thank you very much for your help!

Thank you kindly!

Indeed, after pasting the snippet you provided outside of the commented out block, the error is gone from the status page!  I learned a valuable lesson!

Thank you, Jaypan.

1. Turns out I have a vendor directory in both /var/www/html/drupal and /var/www/html/. And both directories have a composer.json file. What should I do with that?

2. I will keep an eye on permissions and if I run into not being able to execute a command w/o sudo, then I will deal with permissions.

Thank you for your reply.

When I search for settings.php, here is the full list:

/root/.config/composer/vendor/consolidation/site-alias/tests/fixtures/sites/d8/sites/mymultisite/settings.php
/var/www/html/drupal/core/assets/scaffold/files/default.settings.php
/var/www/html/drupal/core/modules/system/tests/themes/test_theme_settings/theme-settings.php
/var/www/html/drupal/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-assets-fixture/assets/default.settings.php
/var/www/html/drupal/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scaffold-override-fixture/assets/override-settings.php
/var/www/html/drupal/core/themes/olivero/theme-settings.php
/var/www/html/drupal/sites/default/.settings.php.swo
/var/www/html/drupal/sites/default/.settings.php.swp
/var/www/html/drupal/sites/default/default.settings.php
/var/www/html/drupal/sites/default/settings.php

I am editing the last one in this list:

/var/www/html/drupal/sites/default/settings.php

I also have a feeling that the "trusted_host_patterns" part is somehow commented out.  When I look at it in vi or Text Editor or by copy/pasting settings.php content into Notepad++, this line looks like the rest of the commented out text (same color).  When I change the asterisks before and after @code and @enclode to */ and /**, so instead of this:

 *
 @code
 $settings['trusted_host_patterns'] = [  '^mydomain\.ca$',   '^localhost$',   '^127\.0\.0\.1$',];
 @endcode
 *

I have this:

 */
 @code
 $settings['trusted_host_patterns'] = [  '^mydomain\.ca$',   '^localhost$',   '^127\.0\.0\.1$',];
 @endcode
 /**

then this snippet looks like the rest of active $settings in the file, but when I run "sudo -u www-data drush cr", drush terminates abnormally, saying:

ParseError: syntax error, unexpected variable "$settings" in /var/www/html/drupal/sites/default/settings.php on line 709

So, it seems that I am editing the correct file, but I can't understand how to uncomment this setting.

Sorry, I figured it out.  Just needed to add sudo:

composer require drush/drush"

After this, the install went through just fine.

Thanks a lot for your help.

Thank you for your answer, Jaypan.

I am sorry to ask, but I am not sure what the project root would be.  :)  I tried running "composer require drush/drush" from /var/www/html/drupal, but then I got:

./composer.json is not writable.

So, of course, I should be in another directory, but I can't figure out which.  Should I do it in "var/www/html/vendor/drush/drush" or in another place?

Production build 0.71.5 2024