简体   繁体   English

Typo3 后端 css 一直消失?

[英]Typo3 backend css keeps disappearing?

I have a typo3 system which works mostly fine, however when ever I install a new extension the CSS on the back-end goes away, or seems to be parsed only partially.我有一个 typo3 系统,它工作得很好,但是当我安装一个新的扩展时,后端的 CSS 消失了,或者似乎只被部分解析了。

screen shot at: http://i.imgur.com/gF8Fa.png屏幕截图: http://i.imgur.com/gF8Fa.png

I've tried several different extension and they all seem to do this.我尝试了几种不同的扩展,它们似乎都这样做了。

Typo3 version 4.4.6 Typo3 版本 4.4.6

If anyone has any ideas... all help is valued and appreciated.如果有人有任何想法......所有帮助都会受到重视和赞赏。 Ta!塔!

Please make sure that you have installed the system extension "t3skin".请确保您已安装系统扩展“t3skin”。 It brings the default skin and is shipped with TYPO3.它带来了默认皮肤,并附带 TYPO3。

If it is installed, check whether your .htaccess has the gzip rules enabled, in case of you have $TYPO3_CONF_VARS['BE']['compressionLevel'] set.如果已安装,请检查您的 .htaccess 是否启用了 gzip 规则,以防您设置了 $TYPO3_CONF_VARS['BE']['compressionLevel']。

In my case I had mod_deflate installed and good .htaccess , but in vhost configuration .htaccess reading was disabled by AllowOverride None , so I turned AllowOverride in All and all worked.在我的情况下,我安装了mod_deflate并且安装了良好的.htaccess ,但是在虚拟主机配置中.htaccess读取被AllowOverride None禁用了,所以我在All中打开AllowOverride并且一切正常。

AllowOverride All

Restart Apache:重启 Apache:

apache2ctl restart

I guess you have some trouble with gzip compressed css here.我猜你在使用 gzip 压缩 css 时遇到了一些问题。 Newer versions of TYPO3 added this feature to speed things up.较新版本的 TYPO3 添加了此功能以加快速度。 Typically TYPO3 can't write to your .htaccess file which is why you have to do it manually.通常 TYPO3 无法写入您的 .htaccess 文件,这就是您必须手动执行此操作的原因。 Just add the following lines to your .htaccess file:只需将以下行添加到您的 .htaccess 文件中:

 <FilesMatch "\.js\.gzip$">
 AddType "text/javascript" .gzip
 </FilesMatch>
 <FilesMatch "\.css\.gzip$">
  AddType "text/css" .gzip
  </FilesMatch>
  AddEncoding gzip .gzip

Note that the .htaccess file is hidden and some ftp / sftp clients won't find it with their default settings.请注意,.htaccess 文件是隐藏的,一些 ftp / sftp 客户端在默认设置下找不到它。 That's basically what StephenKing says just a lil more elaborate.这基本上就是斯蒂芬金所说的,只是稍微详细一点。

Try this in localconf.php:在 localconf.php 中试试这个:

$TYPO3_CONF_VARS['BE']['compressionLevel'] = '0'

It helped in my installation.它有助于我的安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM