Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aktuelle .htaccess liefert CSS Datei als text/plain aus #232

Closed
TobiasKrais opened this issue Aug 12, 2018 · 9 comments
Closed

aktuelle .htaccess liefert CSS Datei als text/plain aus #232

TobiasKrais opened this issue Aug 12, 2018 · 9 comments
Milestone

Comments

@TobiasKrais
Copy link
Contributor

Auf meiner Testseite wird die CSS Datei /media/stylesheet-startseite.css als Content-Type text/plain ausgeliefert. Wenn in der .htaccess die Zeile RewriteRule ^media/(.*) %{ENV:BASE}/index.php?rex_media_type=default&rex_media_file=$1&%{QUERY_STRING} [B] auskommentiere ändert sich der Content-Type zu text/css. Braucht es diese Zeile wirklich?

@TobiasKrais
Copy link
Contributor Author

Der Pull-Request von Ingo würde das wohl beheben: #149

@dergel dergel added this to the Version 2.5 milestone Nov 4, 2018
@iceman-fx
Copy link

iceman-fx commented Nov 5, 2018

Ich schließe mich dem Issue hier an.
Auch bekomme mit der aktuelle htaccess keine CSS geladen, da diese als JPG interpretiert werden.

Wenn man zusätzlich noch Unterordner im media-Ordnernutzt, z.B. für JS-Dateien, dann sollte auch diese Zeile derzeit auskommentiert werden:

RewriteRule ^media/([^/]+)/(.*) %{ENV:BASE}/index.php?rex_media_type=$1&rex_media_file=$2&%{QUERY_STRING} [B]

@staabm
Copy link
Collaborator

staabm commented Dec 26, 2018

Heute im slack erneut gemeldet

@TobiasKrais
Copy link
Contributor Author

Der Fix von Ingo löst zwar das Problem, dass CSS / JS Dateien und andere richtig ausgeliefert werden, aber das auth_media Plugin von YCom ist auf die Zeile angewiesen um die Rechte zu prüfen.

@dergel
Copy link
Member

dergel commented Dec 27, 2018

d.h. auch mit der REDAXO 5.7 Version und dem dort angepassten media_manager klappt die Auslieferung von .css Dateien nicht richtig ? Was passiert genau ?

@TobiasKrais
Copy link
Contributor Author

Ich melde mich Morgen Abend oder Übermorgen. Bin gerade unterwegs.

@TobiasKrais
Copy link
Contributor Author

TobiasKrais commented Dec 29, 2018

Ja, auch mit der 5.7 Beta klappt die Auslieferung nicht richtig. In dieser Zeile:
https://github.com/redaxo/redaxo/blob/19ec96d5ba2cb6a963991053ffe65ded8e1a6aa0/redaxo/src/addons/media_manager/lib/managed_media.php#L373
wird "text/plain" statt "text/css" ausgegeben.

Andere haben wohl auch das Problem: https://stackoverflow.com/questions/45179337/mime-content-type-returning-text-plain-for-css-and-js-files-only

@TobiasKrais
Copy link
Contributor Author

Alle Hinweise die ich im Netz gefunden habe, verwenden eine Lösung wie im Pull Request.

@TobiasKrais
Copy link
Contributor Author

Danke fürs Mergen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants