dongshan8953 2016-05-11 19:49
浏览 72
已采纳

Drupal自定义主题缺少CSS

I am getting a Drupal site to work on my localhost. Currently, it seems to output some content (database is working) but nothing is styled.

When I look in the source-code, I see this:

 <link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="screen" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="print" />
<link type="text/css" rel="stylesheet" href="http://localhost:88/sites/MAA/" media="all" />
  <script type="text/javascript" src="http://localhost:88/sites/MAA/sites/all/modules/jquery_update/replace/jquery/1.8/jquery.min.js?v=1.8.3"></script>

That is, the template's CSS are not being included, except for the path part to the site. Now, the .info file is as follows:

; Stylesheets. Anything within the "framework" folder will be placed before all others.
stylesheets[all][] = styles/framework/reset.css
stylesheets[all][] = styles/framework/text.css
stylesheets[all][] = styles/framework/960.css
stylesheets[all][] = styles/framework/debug.css
stylesheets[all][] = styles/css/css_hides.css

; Theme specific styles. Any sub-themes should override this.
stylesheets[all][] = styles/skin.css
stylesheets[all][] = styles/maa.css
stylesheets[all][] = styles/maa-legacy.css
stylesheets[all][] = styles/jq-ui-date-range-picker/ui.daterangepicker.css
stylesheets[all][] = styles/styles_nvl.css
stylesheets[all][] = styles/css_hides.css
stylesheets[print][] = styles/print.css

; Theme specific scripts.
scripts[] = "js/enlargeit.js"
scripts[] = "js/jquery-ui.js"
scripts[] = "js/custom.js"

regions[page_top]              = Page top
regions[header]                = Header
regions[search_box]            = Search Box
regions[main_nav]              = Main Navigation
regions[highlighted]           = Highlight
regions[featured]              = Featured
regions[help]                  = Help
regions[home_content]          = Home Content
regions[home_content_bottom]   = Home Content Bottom
regions[content]               = Content
regions[sidebar_first]         = Left sidebar
regions[sidebar_second]        = Right sidebar
regions[footer_top]            = Footer Top
regions[footer_top_left]       = Footer Top Left
regions[footer_top_center_one] = Footer Top Center 1
regions[footer_top_center_two] = Footer Top Center 2
regions[footer_top_right]      = Footer Top Right
regions[footer_left]           = Footer Left
regions[footer_right]          = Footer Right
regions[page_bottom]           = Page bottom

Could anyone tell where I should look to troubleshoot this? Inside the html.tpl.php file, there is a line that outputs styles, but I cannot find where it is populated.

 <?php print $styles; ?>
 <?php print $scripts; ?>
  • 写回答

2条回答 默认 最新

  • dqlhsm9820 2016-05-11 20:32
    关注

    Step number one in solving any Drupal problem: Have you tried clearing the cache? (It's the Drupal equivalent of "Have you tried turning it off and back on again?")

    How to clear the cache: If you are logged into the site as an administrator, go to Configuration > Development > Performance. You should see a "Clear All Caches" button.

    If that doesn't work: Have you checked out the Drupal docs? https://www.drupal.org/node/171209

    What happens if you aggregate and compress CSS files (a setting in Configuration > Development > Performance)?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化