Domanda

Ho un elenco di file CSS da un tema premade chiamato Motivo artificiale

Sono elencati nel mio file .info come tale

stylesheets[all][] = assets/css/style.css
stylesheets[all][] = assets/css/preload.css
stylesheets[all][] = assets/css/style-aqua.css
stylesheets[all][] = assets/css/style-blue.css
stylesheets[all][] = assets/css/style-blue2.css
.

..... et cetera per tutti i file nella risorsa / css / cartella

Ho anche script elencati nel file informativo

scripts[] = assets/js/app.js
scripts[] = assets/js/carousels.js
scripts[] = assets/js/coming.js
scripts[] = assets/js/coming2.js
scripts[] = assets/js/commerce.js
.

et cetera

Ho le variabili di stile e script nel mio html.tpl.php

<?php print $styles; ?>
<?php print $scripts; ?>
.

Tuttavia, quando vado dal mio sito gli stili non vengono applicati e non ci sono riferimenti a loro nell'HTML. C'è comunque un riferimento a tutti gli script come visto sotto

<script src="http://WEBSITENAME/sites/all/themes/SITEDIREC/assets/js/app.js?nqtizi">
.

Ho un foglio di stile di coppia che viene tirato dai moduli, ma la maggior parte del CSS a sinistra è tirata da questo

<link media="all" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet" type="text/css">
.

Qualcuno ha idee sul perché questo non funziona? Sono abbastanza nuovo a Drupal, quindi sono proobabilmente di fronte a qualcosa di abbastanza grande.

Avrei dovuto menzionarlo prima: ho cancellato la cache molte volte e ha acceso l'aggregazione CSS / JS per vedere se funzioni senza successo.

Ecco gli errori che ottengo quando lancio il sito

[Thu Jul 02 08:34:40.847061 2015] [fcgid:warn] [pid 3816:tid 416]        mod_fcgid: process 5448 graceful kill fail, sending SIGKILL
[Thu Jul 02 08:34:46.941527 2015] [fcgid:warn] [pid 3816:tid 416] mod_fcgid: process 7124 graceful kill fail, sending SIGKILL
[Thu Jul 02 08:34:50.401630 2015] [fcgid:warn] [pid 3816:tid 416] mod_fcgid: process 2324 graceful kill fail, sending SIGKILL
.

Ecco il file Info completo

name = ART REASON sub-theme
description = based on artifical reason
core = 7.x
base theme = bootstrap


 ;;;;;;;;;;;;;;;;;;;;;
 ;; Regions
 ;;;;;;;;;;;;;;;;;;;;;

 regions[navigation]     = 'Navigation'
 regions[header]         = 'Top Bar'
 regions[highlighted]    = 'Highlighted'
 regions[help]           = 'Help'
 regions[content]        = 'Content'
 regions[sidebar_first]  = 'Primary'
 regions[sidebar_second] = 'Secondary'
 regions[footer]         = 'Footer'
 regions[page_top]       = 'Page top'
 regions[page_bottom]    = 'Page bottom'
 regions[social]            = 'Social'



 ;;;;;;;;;;;;;;;;;;;;;
 ;; Stylesheets
 ;;;;;;;;;;;;;;;;;;;;;

 stylesheets[all][] = assets/css/style.css
 stylesheets[all][] = assets/css/preload.css
 stylesheets[all][] = assets/css/style-aqua.css
 stylesheets[all][] = assets/css/style-blue.css
stylesheets[all][] = assets/css/style-blue2.css
stylesheets[all][] = assets/css/style-blue3.css
 stylesheets[all][] = assets/css/style-blue4.css
 stylesheets[all][] = assets/css/style-blue5.css
 stylesheets[all][] = assets/css/style-fuchsia.css
 stylesheets[all][] = assets/css/style-gray.css
stylesheets[all][] = assets/css/style-green.css
stylesheets[all][] = assets/css/style-green2.css
 stylesheets[all][] = assets/css/style-green3.css
 stylesheets[all][] = assets/css/style-green4.css
 stylesheets[all][] = assets/css/style-green5.css
 stylesheets[all][] = assets/css/style-orange.css
 stylesheets[all][] = assets/css/style-orange2.css
stylesheets[all][] = assets/css/style-orange3.css
 stylesheets[all][] = assets/css/style-pink.css
stylesheets[all][] = assets/css/style-red.css
 stylesheets[all][] = assets/css/style-red2.css
 stylesheets[all][] = assets/css/style-red3.css
 stylesheets[all][] = assets/css/style-violet.css
stylesheets[all][] = assets/css/style-violet2.css
 stylesheets[all][] = assets/css/style-violet3.css
stylesheets[all][] = assets/css/style-yellow.css
stylesheets[all][] = assets/css/style-yellow2.css
stylesheets[all][] = assets/css/vendors.css
stylesheets[all][] = assets/css/width-full.css
 stylesheets[all][] = assets/css/width-boxed.css
 stylesheets[all][] = assets/css/syntaxhighlighter/shCore.css
 stylesheets[all][] = assets/css/syntaxhighlighter/shCoreDefaulter.css
 stylesheets[all][] = assets/css/syntaxhighlighter/shCoreDjango.css
stylesheets[all][] = assets/css/syntaxhighlighter/shCoreEclipse.css
stylesheets[all][] = assets/css/syntaxhighlighter/shCoreEmacs.css
stylesheets[all][] = assets/css/syntaxhighlighter/shCoreFadeToGrey.css
 stylesheets[all][] = assets/css/syntaxhighlighter/shCoreMDUltra.css
stylesheets[all][] = assets/css/syntaxhighlighter/shCoreMidnight.css
stylesheets[all][] = assets/css/syntaxhighlighter/shCoreRDark.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeDefault.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeDjango.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeEclipse.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeEmacs.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeFadeToGrey.css
 stylesheets[all][] = assets/css/syntaxhighlighter/shThemeMDUltra.css
stylesheets[all][] = assets/css/syntaxhighlighter/shThemeMidnight.css
  stylesheets[all][] = assets/css/syntaxhighlighter/shThemeRDark.css



;;;;;;;;;;;;;;;;;;;;;;
;; JS
;;;;;;;;;;;;;;;;;;;;;;

scripts[] = assets/js/app.js
scripts[] = assets/js/carousels.js
scripts[] = assets/js/coming.js
scripts[] = assets/js/coming2.js
scripts[] = assets/js/commerce.js
scripts[] = assets/js/e-commerce_product.js
scripts[] = assets/js/home_full.js
scripts[] = assets/js/home_inverse_navbar.js
 scripts[] = assets/js/home_login_full.js
scripts[] = assets/js/home_plain.js
scripts[] = assets/js/home_product.js
scripts[] = assets/js/home_profile.js
scripts[] = assets/js/home_services.js
scripts[] = assets/js/html5shiv.min.js
scripts[] = assets/js/index.js
scripts[] = assets/js/jquery.min.map
scripts[] = assets/js/lightbox.min.map
scripts[] = assets/js/page_charts.js
scripts[] = assets/js/portfolio.js
scripts[] = assets/js/respond.min.js
scripts[] = assets/js/slidebars.js
scripts[] = assets/js/styleswitcher.js
scripts[] = assets/js/vendors.js





 ; For information on choosing the desired method, please read the Drupal
 ; Bootstrap sub-theme "how-to" documentation:
; https://drupal.org/node/1978010

; ;----------------------------------
; ; METHOD 1: Bootstrap Source Files
; ;----------------------------------
; 
 ; ;;;;;;;;;;;;;;;;;;;;;
; ;; Scripts
 ; ;;;;;;;;;;;;;;;;;;;;;
; 
; scripts[] = 'bootstrap/js/affix.js'
; scripts[] = 'bootstrap/js/alert.js'
; scripts[] = 'bootstrap/js/button.js'
 ; scripts[] = 'bootstrap/js/carousel.js'
; scripts[] = 'bootstrap/js/collapse.js'
; scripts[] = 'bootstrap/js/dropdown.js'
; scripts[] = 'bootstrap/js/modal.js'
; scripts[] = 'bootstrap/js/tooltip.js'
; scripts[] = 'bootstrap/js/popover.js'
; scripts[] = 'bootstrap/js/scrollspy.js'
; scripts[] = 'bootstrap/js/tab.js'
; scripts[] = 'bootstrap/js/transition.js'
.

Risolto: un problema così semplice per quanto lavoro ho messo nel tentativo di risolverlo. Non ho avuto il filepath corretto specificato nel file .info, perché ho pensato, in modo errato, che il filepath fosse relativo al modello invece del file .info. Quindi ho dovuto andare modelli / beni / CSS invece di beni / CSS. Avevo provato questa soluzione prima, ma immagino di aver dimenticato prima la mia cache. Grazie per l'aiuto

-matt

È stato utile?

Soluzione 2

Risolto: un problema così semplice per quanto lavoro ho messo nel tentativo di risolverlo.Non ho avuto il filepath corretto specificato nel file .info, perché ho pensato, in modo errato, che il filepath fosse relativo al modello invece del file .info.Quindi ho dovuto andare modelli / beni / CSS invece di beni / CSS.Avevo provato questa soluzione prima, ma immagino di aver dimenticato la mia cache per prima cosa applicando quella correzione.Grazie per l'aiuto

-matt

Altri suggerimenti

Considera il controllo delle varie risposte alla domanda su Non può disabilitare la cache del CSSe aggregazione ... include alcuni suggerimenti che possono aiutare anche nel tuo caso, come ad esempio:

    .
  • prova a cancellare la cache?
  • Aggregazione CSS / JS attivata?
  • Qualsiasi meccanismi di cache (come vernice) installati sul server?
  • potrebbe essere un modulo o un tema che ha codificato in modo difficile la cache del CSS?

Poiché nessuno di questi è menzionato nella tua domanda, pensavo che valesse la pena puntare a loro ...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a drupal.stackexchange
scroll top