<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why can't I add a stylesheet and script to my simple xml dashboard? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403950#M71748</link>
    <description>&lt;P&gt;I have a simple XML dashboard that is calling two stylesheets and two scripts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form stylesheet="styleA.css, styleB.css" script="scriptA.js, scriptB.js"&amp;gt;...&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;styleA.css and scriptA.js are loading properly, but I'm getting these errors for styleB.css and scriptB.js:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Refused to apply style from {styleB.css url} because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;GET {scriptB.js url} 404 (Not Found)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;All of these files are located in the appserver/static directory of the app. There are no weird characters that I see in them. I've tried restarting Splunk, as well as splunkweb, doing a _bump after each. &lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 22:48:02 GMT</pubDate>
    <dc:creator>matstap</dc:creator>
    <dc:date>2019-02-20T22:48:02Z</dc:date>
    <item>
      <title>Why can't I add a stylesheet and script to my simple xml dashboard?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403950#M71748</link>
      <description>&lt;P&gt;I have a simple XML dashboard that is calling two stylesheets and two scripts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form stylesheet="styleA.css, styleB.css" script="scriptA.js, scriptB.js"&amp;gt;...&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;styleA.css and scriptA.js are loading properly, but I'm getting these errors for styleB.css and scriptB.js:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Refused to apply style from {styleB.css url} because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;GET {scriptB.js url} 404 (Not Found)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;All of these files are located in the appserver/static directory of the app. There are no weird characters that I see in them. I've tried restarting Splunk, as well as splunkweb, doing a _bump after each. &lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 22:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403950#M71748</guid>
      <dc:creator>matstap</dc:creator>
      <dc:date>2019-02-20T22:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I add a stylesheet and script to my simple xml dashboard?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403951#M71749</link>
      <description>&lt;P&gt;I cleared my browser's cache and it worked lol&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 00:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403951#M71749</guid>
      <dc:creator>matstap</dc:creator>
      <dc:date>2019-02-22T00:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I add a stylesheet and script to my simple xml dashboard?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403952#M71750</link>
      <description>&lt;P&gt;Verify that you are correctly referencing your files.  I've seen this problem when not correctly referencing the file location.&lt;/P&gt;

&lt;P&gt;My dashboard source had this incorrect reference to a custom style sheet. (receiving MIME incorrect type error)&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;dashboard stylesheet="&lt;STRONG&gt;custom_styles.css&lt;/STRONG&gt;"&amp;gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;My style sheet actually existed under the directory '/splunk/etc/apps/myapp/appserver/static/styles'&lt;/P&gt;

&lt;P&gt;So after updating the dashboard style sheet reference the correct file location all was well. &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;dashboard stylesheet="&lt;STRONG&gt;styles&lt;/STRONG&gt;/custom_styles.css"&amp;gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 11 Apr 2019 12:46:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-can-t-I-add-a-stylesheet-and-script-to-my-simple-xml/m-p/403952#M71750</guid>
      <dc:creator>jrouse025</dc:creator>
      <dc:date>2019-04-11T12:46:25Z</dc:date>
    </item>
  </channel>
</rss>

