[Solved] Mythweb dependancy on external googleapis

Post Reply
gertk
Newcomer
Posts: 4
Joined: Sun Nov 04, 2018 4:47 pm
Netherlands

[Solved] Mythweb dependancy on external googleapis

Post by gertk »

Hi,

I am running MythTV for a long time and recently installed the latest version on a new small homeserver system.
When trying to access Mythweb all seems to work ok but when I try to delete a recording from the list, the buttons are unresponsive.
Noscript is always on in my browser and it noted that the mythweb page tried to access external code from ajax<dot>googleapis<dot>com

Is this necessary ? Can I store this part on my own server ? I do not like the idea that Google is connected to my TV recording system.
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb dependancy on external googleapis

Post by bill6502 »

Hi,

A setting was added in 12/2017 that uses using googleapis by default. There is no GUI
to change it. The following turns it off:

Code: Select all

curl --data Key=mythweb_use_cdn --data Value=0 --data HostName='' localhost:6544/Myth/PutSetting
I turned mine off and checked two pages (didn't delete anything though.) Can't speak to any
problems this might cause, other than using an out-of-date library. Change Value to 1 to
restore it to current operation.

Surest way to test would be to restart your webserver and mythbackend after switching the value.

Code: Select all

commit ef998f4172565743307b89fe2eb2fb90abf81e8b
Date:   Fri Dec 8 13:18:02 2017 +0000

    Fixes #13191 - Make mythweb use of CDN optional.
    
    Adds a new database setting 'mythweb_use_cdn' which defaults
    to true. If you wish to use local copies of the libraries or
    run on an isolated network you will need to set this to false
    
    There is no gui in the mythweb setting page to configure this
    at this time. Patches for this will be accepted.
    
    In addition this add the updated libraries locally.
gertk
Newcomer
Posts: 4
Joined: Sun Nov 04, 2018 4:47 pm
Netherlands

Re: Mythweb dependancy on external googleapis

Post by gertk »

Thanks for the quick reply

The dependancy seems to be gone, but when I click on 'delete recording' it shows the popup screen asking me if I really want to delete it and on clicking OK the popup disappears but the recording stays...
johnedwards
Newcomer
Posts: 1
Joined: Sat Nov 17, 2018 6:16 pm
Great Britain

Re: Mythweb dependancy on external googleapis

Post by johnedwards »

There is a bug in the location of the local JavaScript files that was introduced in the patch in trac ticket #13191

- print "<script type=\"text/javascript\" src=\"js/prototype.js\"></script>";
- print "<script type=\"text/javascript\" src=\"js/jquery-1.9.1.min.js\"></script>";
+ print "<script type=\"text/javascript\" src=\"js/ajax/libs/prototype/1.7.3.0/prototype.js\"></script>";
+ print "<script type=\"text/javascript\" src=\"js/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>";

Full patch file attached.
Attachments
mythtv-javascript-patch.txt
(668 Bytes) Downloaded 181 times
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb dependancy on external googleapis

Post by bill6502 »

Hi johnedwards,

That patch doesn't apply in master as it's already there. Check the version of
mythweb installed. v0.28.2 and above have it in my tree.

Take a look for the following in:

Code: Select all

includes/db_update.php

 // What *should* the database version be?
    define('WebDBSchemaVer', 5);
If the version isn't 5, then you're running an old version of mythweb.

Ref: https://code.mythtv.org/trac/browser/my ... 68ba9#L109
gertk
Newcomer
Posts: 4
Joined: Sun Nov 04, 2018 4:47 pm
Netherlands

Re: Mythweb dependancy on external googleapis

Post by gertk »

When I select a programmed recording and try to open the 'advanced options' nothing happens after this patch, same goes (as I noted earlier) for the recorded program options (buttons do not respond)
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb dependancy on external googleapis

Post by bill6502 »

@gertk,

I did delete two recordings this morning. I went to the mythweb Recorded Programs page, clicked
on the far left preview of the recording and in details page clicked on delete. Got the
prompt screen and clicked yes.

The recording was deleted. I'm running 30-Pre with a matching mythweb.

Suggest looking in your webserver's log. Mine is in /var/log/apache2/error.log
(and had nothing unusual for the deletes.) Nothing in the backend log either.

There's always WebFrontend, yourbackend:6544 and mouse-over the menu on
the left. Not a solution, just an option if this is really getting in your way.
gertk
Newcomer
Posts: 4
Joined: Sun Nov 04, 2018 4:47 pm
Netherlands

Re: Mythweb dependancy on external googleapis

Post by gertk »

Found the cuplrit in the apache logs: it tried to access the (local) ajax libraries but they were not yet there, I copied them from the build directory to the corresponding js directory and now it works.
Post Reply