On plain D8 install it looks like aggregated css stylesheets are not available.
After I switch the aggregation off all looks fine. Also with JS aggregation ON navigation is missing.
I set both to off for now, anyone having the same problem?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stickplow created an issue. See original summary.

stickplow’s picture

FileSize
27.77 KB
nod_’s picture

Component: CSS » asset library system

Does it also happens when the site is in english?

stickplow’s picture

Just added english set it to default cleared cache and yes still same effects

dcrocks’s picture

Are you running as a virtual host? A personal web server on OS X? Can you see errors on your web server logs or on the browsers web console?

stickplow’s picture

With Aggregate CSS ON when trying to open stylesheet I get

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 admin@myprovider.pl and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>

That happens with all 4 stylesheets

<link rel="stylesheet" href="http://mysite.myprovider.pl/sites/default/files/css/css_A-EA796OwnV1Y5vw0WbL6kqbndDoq01b8bKb5_azo6Q.css?ny541s" media="all" />
<link rel="stylesheet" href="http://mysite.myprovider.pl/sites/default/files/css/css_Va4zLdYXDM0x79wYfYIi_RSorpNS_xtrTcNUqq0psQA.css?ny541s" media="screen" />
<link rel="stylesheet" href="http://mysite.myprovider.pl/sites/default/files/css/css_Fzq2acFQifeJNBwePr4JOHuz959JAJMjZYpTPXv7Fbo.css?ny541s" media="all" />
<link rel="stylesheet" href="http://mysite.myprovider.pl/sites/default/files/css/css_03m4_aPMNYsCmeB7GFcA_8ITG2stiliUOi7HBG-7nJA.css?ny541s" media="all" />

Also I tred to add logo and icon and they are not showing as well even with aggregation OFF

<link rel="shortcut icon" href="http://mysite.myprovider.pl/sites/default/files/48px.png" type="image/png" />

is returning same message as the stylesheets
With aggregation off the theme is back but the logo file is still showing the error.
I'm on shared hosting.

dcrocks’s picture

dcrocks’s picture

Try to edit ../yourdrupal/sites/default/files/.htaccess. You should see something like

# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews

Delete '-Multiviews', save, and refresh your site. Hopefully that's it.

stickplow’s picture

No luck with #8

serg2’s picture

It does sound like a server permission/configuration issue linked to the changes in .htaccess .
If installing D7 on the same configuration do you have to make any changes to the default .htaccess, such as replacing 'FollowSymLinks' with 'SymLinksIfOwnerMatch'?

stickplow’s picture

I have few D7 sites running perfectly on same server without any modification to .htaccess. The only diference with D8 install is that I have to force php version to 5.6 by pasting

<Files *.php>
 ForceType application/x-httpd-php56
</Files> 

in public_html/.htaccess

hejazee’s picture

Priority: Normal » Major

I have the same problem with Apache/mod_lsapi

The solution is to edit sites/default/files/.htaccess

And remove -ExecCGI
like this:

Options -Indexes -Includes -MultiViews

the error goes away.

I think this may be a bug with Drupal.
Maybe Drupal should use some kind if directive and place -ExecCGI in it.

Set priority to major because site does not work properly after fresh install.

cilefen’s picture

@hejazee What happens HTML of your pages? Are there no CSS files included in the head section?

hejazee’s picture

@cilefen, No, The html output is normal
The only problem is that all files in sites/default/files folder produce a 500 Internal server error.
No matter whether its a text file (with .txt extension) or a css or js file

The problem is inside sites/default/files folder
Because when I remove "-ExecCGI" everything is fixed.

I think it's not related with Drupal's process. because no PHP process is involved when accessing sites/default/files/file.txt

You can reproduce my problem by installing CloudLinux with Directadmin and this config:
Apache: mod_lsapi
Nginx reverse proxy

desro’s picture

I had the same problem. After installing Drupal 8 on my host, the toolbar css wasn't showing up. The admin links were showing as a list and a lot of the options weren't available because files from /sites/default/files were returning a 500 error code; a lot of the theme wasn't displaying correctly.

I went to Administration > Configuration > Development > Performance and turned off Aggregate CSS files and Aggregate JavaScript files per @stickplow post, and the css and javascript started appearing. However, the home page is still logging a 500 error from the same directory for my site logo.

I have not yet changed the sites/default/files/.htaccess file to remove -MultiViews or -ExecCGI as suggested by comments #8 and #12 as I am not sure what removing either of those options does as of yet. From here I am referencing #2619250: Disabling -MultiViews in .htaccess can cause 500 errors about -MultiViews.

Edit

I was not having any luck after deleting the -ExecCGI option from the .htaccess file. However, I did comment out the Options line #Options -Indexes -Includes -MultiViews and suddenly the files were all accessible through Drupal. I was even able to turn the Aggregate CSS and JavaScript options back on in Administration > Configuration > Development > Performance.

Wim Leers’s picture

Title: No CSS Styles when CSS Aggregation ON » CSS/JS aggregates do not load: HTTP 500 errors when mod_lsapi is installed
Status: Active » Postponed (maintainer needs more info)

Clarifying based on #12.

#15: Can you please confirm that you also use mod_lsapi? Or some other special Apache mods?

@all: Can you please check whether image styles work for you? If CSS/JS aggregates don't work, image styles likely also won't work. They use the same mechanism.

desro’s picture

@WimLeers: My phpinfo() shows

Additional Modules
Module Name
sysvshm

Is that what you were looking for?

Wim Leers’s picture

That's PHP. We're talking about Apache modules.

youyoums’s picture

i have the same problem,my server is centos 7.2.1511,php 7.0.3,and directadmin 1.5

albertski’s picture

I had the same issue. Somehow I had the config .htaccess file and README file insides sites/default (as well as sites/default/config). I may have done this accidentally. Once I removed the .htaccess in sites/default it fixed this problem for me.

bastl’s picture

Same issue here, can fix it by removing -ExecCgi and -Includes from .htaccess Options line in default/files/.htaccess.

But I dont understand the other consequences. These things are there for a reason, I assume? Can anyone explain?

What is better: disabling aggregation in config, or tweaking htaccess with unknown consequences ?

Background: Im on a shared hosting service "1und1.de", I have created a testing-stage / multi-site environment yesterday and have played around with config-sync and sql-sync (from prod to testing). After that played around with the testing's configuration (theme, removed language-module).

auxiliaryjoel’s picture

Any more info on this one, I can't Aggregate JS without my slideshow images disappearing and my mobile burger menus ceasing to open.
I've removed the line:
Options -Indexes -ExecCGI -Includes -MultiViews

from my sites/default/files htaccess

but that didn't change anything
I can fix it by not Aggregating my JS in Performance settings, but I do want to Aggregate my JS...?

Localhost (via MAMP on mac): works fine
cPanel shared server: Aggregate JS causes Slide images and Burger menu to stop working

Any help would be appreciated

cilefen’s picture

What are the browser console errors?

Version: 8.0.0 » 8.0.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.0.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

larowlan’s picture

Category: Bug report » Support request
Issue tags: +Bug Smash Initiative

Given this seems to be isolated to certain server setups, reclassifying this as a support request

If we can get steps to reproduce happy to move it back

hejazee’s picture

Status: Postponed (maintainer needs more info) » Needs review

If you are using Directadmin, the simplest solution is to enable CGI Access for your user account.
when `enable CGI Access` checkbox is checked, the ExecCGI flag in the .htaccess, will not trigger that errors.

Anyway, the ultimate solution is to check the webserver's logs to find the actual problem. most of these problems are caused by a misconfigured webserver.

cilefen’s picture

Status: Needs review » Postponed (maintainer needs more info)

There is no code to review.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

No new information has been posted.

michiellucas’s picture

hey,

default drupal css aggregation is trowing this error
CGI acccess is on ...
Removed htaccess from files folder

But still error

[Tue Dec 13 16:01:59.721915 2022] [lsapi:error] [pid 147647:tid 140526170867456] [client 2a02:1807:4700:f00:34ae:47a2:8ca1:7474:58814] ] Error on sending request(GET /nl HTTP/1.1); uri(/index.php) content-length(0): ReceiveAckHdr: nothing to read from backend (LVE ID 1081), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html

Hosting party won't fix or look for it

Anyone idea?

HoangD’s picture

The problem will be resolved by
replacing 'FollowSymLinks' with 'SymLinksIfOwnerMatch' in 2 files :
drupal_root/.htaccess
drupal_root/sites/default/files/advagg_js/.htaccess