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条)

报告相同问题?

悬赏问题

  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了