While searching around the Web I found this Fixes #13191 - Make mythweb use of CDN optional. · MythTV ... which eludes to a solution but it does not appear to be fully implemented and I could not find any documentation about it. I tried setting the 'mythweb_use_cd' variable to false but could not get MythWeb to load from the local source. Also, the standard MythWeb installation does not create the specified locations or provide the 2 needed files.
So my fix to this issue is to comment out the use of the 'mythweb_use_cd' variable forcing MythWeb to load these files from the local location specified. To support this we need to create the appropriate directories containing our 2 needed files.
Since this is my first post I'm blocked from making any links & using certain terms so you'll have search on what wants to be a link above and replace the x's where necessary in the following code. This will become obvious when editing the listed file.
You'll need to SSH into your MythTV back-end & perform the following tasks:
First we need to comment these lines from the file:
Code: Select all
sudo nano /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php
Code: Select all
<?php
// if (setting('mythweb_use_cdn', null))
// {
// print "<script src=\"https://ajax.xxxxxxxxx.xxx/ajax/libs/prototype/1.7.3.0/prototype.js\"></script>";
// print "<script src=\"https://ajax.xxxxxxxxx.xxx/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>";
// }
// else
// {
print "<script type=\"text/javascript\" src=\"js/ajax/libs/prototype/1.7.3.0/prototype.jx\"></script>";
print "<script type=\"text/javascript\" src=\"js/ajax/libs/jquery/3.2.1/jquery.min.jx\"></script>";
// }
?>
Next we need to make a matching directory structure to copy our java scripts into. We could place these files anywhere but why not just use the locations already defined in 'header.php':
Code: Select all
sudo mkdir -p /usr/share/mythtv/mythweb/js/ajax/libs/prototype/1.7.3.0/
sudo mkdir -p /usr/share/mythtv/mythweb/js/ajax/libs/jquery/3.2.1/
Code: Select all
wget https://ajax.xxxxxxxxxx.xxx/ajax/libs/prototype/1.7.3.0/prototype.js
wget https://ajax.xxxxxxxxxx.xxx/ajax/libs/jquery/3.2.1/jquery.min.js
sudo cp prototype.js /usr/share/mythtv/mythweb/js/ajax/libs/jquery/3.2.1/prototype.js
sudo cp jquery.min.js /usr/share/mythtv/mythweb/js/ajax/libs/prototype/1.7.3.0/jquery.min.js
Now we're good to go!
I've seen this issue come up a few times so just thought I'd share my solution.
Long time user - thanks to all the developers ...