<?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 Re: ServerSideInclude Module Error! Invalid template path after splunk upgrade to 7.3.1 in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/ServerSideInclude-Module-Error-Invalid-template-path-after/m-p/472710#M74293</link>
    <description>&lt;P&gt;Hi @lekshmi279, I'm having the same error after upgrading my Splunk Enterprise (Windows) to version 7.3.1. &lt;BR /&gt;
Our module-based dashboard page is throwing an error:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;ServerSideInclude Moduel Error!&lt;/STRONG&gt; &lt;BR /&gt;
Invalid template path. C:\APP\myapplication\appserver\static\mydashboard.html&lt;/P&gt;

&lt;P&gt;After searching for the ServerSideInclude Module error in Splunk logs (&lt;EM&gt;web_service.log&lt;/EM&gt;)&lt;BR /&gt;
It brought me to this HTML file &amp;gt; &lt;STRONG&gt;C:\Program Files\Splunk\share\splunk\search_mrsparkle\modules\include\ServerSideInclude.html&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Inside this HTML file is a Python script that fetches the dashboard's HTML.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7636iEF5E831BF43928B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Noticed in line 19, it has a condition to check &lt;STRONG&gt;if common_prefix == safedir&lt;/STRONG&gt; else, it will throw the message in line 34 (which the dashboard page is showing).&lt;BR /&gt;
In line 14, it is getting the &lt;STRONG&gt;src&lt;/STRONG&gt; as an absolute path and &lt;STRONG&gt;safedir&lt;/STRONG&gt; as a hard-coded path, which will have:&lt;BR /&gt;
src = C:\APP\myapplication\appserver\static\mydashboard.html&lt;BR /&gt;
safedir = /APP/myapplication/appserver/static&lt;/P&gt;

&lt;P&gt;However at line 15, &lt;STRONG&gt;common_prefix&lt;/STRONG&gt; is obtained by os.path.commonprefix() method which checks for common prefix by comparing character by character in the path of &lt;STRONG&gt;safedir&lt;/STRONG&gt; and &lt;STRONG&gt;src&lt;/STRONG&gt;. Since it compares path by characters it will give a &lt;STRONG&gt;null&lt;/STRONG&gt; value for the &lt;STRONG&gt;common_prefix&lt;/STRONG&gt; and once it goes to condition it will not satisfy the condition thus giving the error message.&lt;/P&gt;

&lt;P&gt;As a workaround on this error - I just comment-out line 14, so that &lt;STRONG&gt;src&lt;/STRONG&gt; value will remain as it was in line 10, which will have:&lt;BR /&gt;
src = /APP/myapplication/appserver/static/mydashboard.html&lt;BR /&gt;
safedir = /APP/myapplication/appserver/static&lt;BR /&gt;
common_prefix = /APP/myapplication/appserver/static&lt;BR /&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7637iE13D5B911B567AD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After saving the file, the dashboard began to show. &lt;/P&gt;

&lt;P&gt;However, I think it is not appropriate to make this changes in Splunk internal files every time we are deploying Splunk application in Windows (in Linux enviroment the changes is not required). Hope Splunk team will be able to check about this. THANKS!&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 05:33:14 GMT</pubDate>
    <dc:creator>RonelleRicabord</dc:creator>
    <dc:date>2019-09-12T05:33:14Z</dc:date>
    <item>
      <title>ServerSideInclude Module Error! Invalid template path after splunk upgrade to 7.3.1</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/ServerSideInclude-Module-Error-Invalid-template-path-after/m-p/472709#M74292</link>
      <description>&lt;P&gt;Hi everyone! I installed v7.3.1 recently in my local machine (locahost:8001) and one of the apps I have installed shows the error ServerSideInclude Module Error! Invalid template path:  Do you have any suggestions on how I can fix this?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 10:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/ServerSideInclude-Module-Error-Invalid-template-path-after/m-p/472709#M74292</guid>
      <dc:creator>lekshmi279</dc:creator>
      <dc:date>2019-09-05T10:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: ServerSideInclude Module Error! Invalid template path after splunk upgrade to 7.3.1</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/ServerSideInclude-Module-Error-Invalid-template-path-after/m-p/472710#M74293</link>
      <description>&lt;P&gt;Hi @lekshmi279, I'm having the same error after upgrading my Splunk Enterprise (Windows) to version 7.3.1. &lt;BR /&gt;
Our module-based dashboard page is throwing an error:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;ServerSideInclude Moduel Error!&lt;/STRONG&gt; &lt;BR /&gt;
Invalid template path. C:\APP\myapplication\appserver\static\mydashboard.html&lt;/P&gt;

&lt;P&gt;After searching for the ServerSideInclude Module error in Splunk logs (&lt;EM&gt;web_service.log&lt;/EM&gt;)&lt;BR /&gt;
It brought me to this HTML file &amp;gt; &lt;STRONG&gt;C:\Program Files\Splunk\share\splunk\search_mrsparkle\modules\include\ServerSideInclude.html&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Inside this HTML file is a Python script that fetches the dashboard's HTML.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7636iEF5E831BF43928B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Noticed in line 19, it has a condition to check &lt;STRONG&gt;if common_prefix == safedir&lt;/STRONG&gt; else, it will throw the message in line 34 (which the dashboard page is showing).&lt;BR /&gt;
In line 14, it is getting the &lt;STRONG&gt;src&lt;/STRONG&gt; as an absolute path and &lt;STRONG&gt;safedir&lt;/STRONG&gt; as a hard-coded path, which will have:&lt;BR /&gt;
src = C:\APP\myapplication\appserver\static\mydashboard.html&lt;BR /&gt;
safedir = /APP/myapplication/appserver/static&lt;/P&gt;

&lt;P&gt;However at line 15, &lt;STRONG&gt;common_prefix&lt;/STRONG&gt; is obtained by os.path.commonprefix() method which checks for common prefix by comparing character by character in the path of &lt;STRONG&gt;safedir&lt;/STRONG&gt; and &lt;STRONG&gt;src&lt;/STRONG&gt;. Since it compares path by characters it will give a &lt;STRONG&gt;null&lt;/STRONG&gt; value for the &lt;STRONG&gt;common_prefix&lt;/STRONG&gt; and once it goes to condition it will not satisfy the condition thus giving the error message.&lt;/P&gt;

&lt;P&gt;As a workaround on this error - I just comment-out line 14, so that &lt;STRONG&gt;src&lt;/STRONG&gt; value will remain as it was in line 10, which will have:&lt;BR /&gt;
src = /APP/myapplication/appserver/static/mydashboard.html&lt;BR /&gt;
safedir = /APP/myapplication/appserver/static&lt;BR /&gt;
common_prefix = /APP/myapplication/appserver/static&lt;BR /&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7637iE13D5B911B567AD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After saving the file, the dashboard began to show. &lt;/P&gt;

&lt;P&gt;However, I think it is not appropriate to make this changes in Splunk internal files every time we are deploying Splunk application in Windows (in Linux enviroment the changes is not required). Hope Splunk team will be able to check about this. THANKS!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 05:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/ServerSideInclude-Module-Error-Invalid-template-path-after/m-p/472710#M74293</guid>
      <dc:creator>RonelleRicabord</dc:creator>
      <dc:date>2019-09-12T05:33:14Z</dc:date>
    </item>
  </channel>
</rss>

