Unable to delete recordings in Mythweb

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Unable to delete recordings in Mythweb

Post by g1bwt »

I recently upgraded to Kubuntu 22.04 from Kubuntu 20.04. This bought in Ubuntu packages Mythtv 2:32.0+fixes.20220325 automatically.
I then found that in Mythweb using that version I was unable to delete recordings from the Recorded Programs page, using either the Delete or the Delete + Rerecord buttons. There is no confirm popup box as there used to be back in Kubuntu 20.04 Mythtv. I can delete by clicking on the program title and then clicking on the Delete button. I then get the confirm popup box.

I then added the Mythbuntu 33 PPA and updated to that version and have the same problem.

I have tried Firefox 101, Brave 1.39.122, Vivaldi 5.3.2679.55.
Firefox and Vivaldi both have Noscript extension running, but allowed for the localhost.
I have tried turning off all the tracking protection and restarting in Safe mode.

I have also tried Safari on an iPad using iPadOS 15 but then I get the confirmation popup box :roll:

Does this mean that there is a problem with all the browsers mentioned above apart from Safari? How can I diagnose this problem please?

Thanks.

Kevin

When running Firefox Inspect I see the following:
Uncaught ReferenceError: confirm_delete is not defined
onclick http://willow.local/mythweb/tv/recorded:1
A quick search of the Mythtv forum found this post from December 2015
viewtopic.php?f=36&t=1160&p=5712&hilit= ... ript#p5712

Please attach all output as a file in bug reports.
MythTV Version : v33.0~master.202206130247.dd68df4676~ubuntu22.04.1
MythTV Branch : master
Network Protocol : 91
Library API : 33.20220201-1
QT Version : 5.15.3
Options compiled in:
linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun using_satip using_vbox using_ceton using_joystick_menu using_libcec using_libcrypto using_gnutls using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_v4l2prime using_x11 using_system_libbluray using_system_libudfread using_systemd_notify using_systemd_journal using_drm using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_egl using_drm using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame
Last edited by g1bwt on Fri Jun 17, 2022 5:47 pm, edited 2 times in total.
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Re: Unable to delete recordings in Mythweb

Post by g1bwt »

Just thought to look at the apache2 error log. This is generated when I click on the Recorded Programs link from the program listing page:

Code: Select all

[Wed Jun 15 19:57:00.378501 2022] [php:error] [pid 25041] [client 192.168.122.1:57894] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: int / string in /usr/share/mythtv/mythweb/modules/tv/tmpl/default/recorded.php:272
Stack trace:
#0 /usr/share/mythtv/mythweb/modules/tv/recorded.php(193): require_once()
#1 /usr/share/mythtv/mythweb/modules/tv/handler.php(82): require_once('...')
#2 /usr/share/mythtv/mythweb/mythweb.php(35): require_once('...')
#3 {main}
  thrown in /usr/share/mythtv/mythweb/modules/tv/tmpl/default/recorded.php on line 272, referer: http://willow.local/mythweb/tv/list
There is nothing generated when I click on the Delete button in either the error.log or the access.log

Kevin
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Unable to delete recordings in Mythweb

Post by bill6502 »

Does: dpkg -l mythweb show that a matching version of mythweb is installed?
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Re: Unable to delete recordings in Mythweb

Post by g1bwt »

No, just the one.

Code: Select all

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                                             Architecture Description
+++-==============-===================================================-============-======================================
ii  mythweb        2:33.0~master.202206151447.c4dcb881b1~ubuntu22.04.1 all          Web interface add-on module for MythTV
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Unable to delete recordings in Mythweb

Post by bill6502 »

The commit above: [c4dcb881b1] is from the MythTV repository, not mythweb.

Not sure what's going on. I'm also on master (the v33-Pre tag) and the latest mythweb and I do
get the confirmation popup box. Only tested with Vivaldi 5.3.2679.58.

(Very) Wild guess, see if cookies turned on in the failing cases.

I don't get anything in /var/log/apache2/error.log (except for normal startup messages).
That's why I was questioning the mythweb version.

dpkg -l libapache2-mod-php* shows I'm on version 7.4. . ls -l /etc/apache2/mods-enabled/php7.4.*
shows v7.4 is enabled.

Maybe look at ls -l /etc/php/7.?/apache2/conf.d/20-mythweb.ini, but I don't know why it would
work in one browser and fail in two others.

Good luck!
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Re: Unable to delete recordings in Mythweb

Post by g1bwt »

This is where I hang my head in shame...

Removing the cookies for willow.local meant that I now get the confirmation box on Firefox, Vivaldi and Brave. Who'd have thought that such a simple thing could cause so much hassle. :o

Thanks.

Kevin
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Re: Unable to delete recordings in Mythweb

Post by g1bwt »

Well, that was short lived. It's not working again on all browsers.
Because I like view the listing times in 24 hour clock, I went to mythweb/settings/tv and, under My Session, changed the drop down box to the 24 hour setting.
When I went back to the Recorded Programs page, I don't now get the confirmation box again. I again removed the cookie and the confirmation box reappeared.

Presumably this means that it is somehow to do with the cookie that set when I change the time format? This happens across all three browsers (Firefox, Brave and Vivaldi) and now Safari on iPadOS 15.5.

In answer to the other questions:

Code: Select all

kevin@willow:~$ dpkg -l libapache2-mod-php*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version          Architecture Description
+++-=====================-================-============-=========================================================================
ii  libapache2-mod-php    2:8.1+92ubuntu1  all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
un  libapache2-mod-php5   <none>           <none>       (no description available)
rc  libapache2-mod-php7.4 8.1.2-1ubuntu2   amd64        Transitional package
un  libapache2-mod-php8.0 <none>           <none>       (no description available)
ii  libapache2-mod-php8.1 8.1.2-1ubuntu2.1 amd64        server-side, HTML-embedded scripting language (Apache 2 module)

Code: Select all

kevin@willow:~$ cat /etc/php/8.1/apache2/conf.d/20-mythweb.ini
; default are 1000 input vars, at 16 vars per channel that is 62 channels
; before the channel editor in mythweb breaks
max_input_vars = 50000
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Unable to delete recordings in Mythweb

Post by bill6502 »

Maybe my last shot: http://yourbackend/mythweb/settings/mythweb/defaults lower right, left box Reset.
g1bwt
Junior
Posts: 15
Joined: Fri Jan 21, 2022 3:16 pm
Great Britain

Re: Unable to delete recordings in Mythweb

Post by g1bwt »

bill6502 wrote:
Fri Jun 17, 2022 10:15 pm
Maybe my last shot: http://yourbackend/mythweb/settings/mythweb/defaults lower right, left box Reset.
No, clicking on the Reset button did nothing. I did change one of the tick options and saved it but no. The only thing to get the confirmation box back on the Recorded Programs screen is to remove the cookie :cry: This of course, resets the 24 hour time display, so it looks like I will have to live with that.

Thanks for your help.

Kevin
Druco
Newcomer
Posts: 1
Joined: Fri Mar 31, 2023 7:30 am
United States of America

Re: Unable to delete recordings in Mythweb

Post by Druco »

If anyone still has this problem, I fixed it by modifying the file:
/usr/share/mythtv/mythweb/modules/tv/tmpl/default/recorded.php

Code: Select all

*** recorded.php.ORIG   2023-03-30 23:40:42.338915746 -0700
--- recorded.php        2023-03-31 00:23:35.050128385 -0700
***************
*** 267,273 ****
  
  <div id="recorded_pager">
  <?php
!     if ($_SESSION['recorded_paging'] > 0) {
          echo 'Pages - ';
          $total_pages = ceil(count($All_Shows)/$_SESSION['recorded_paging']);
          $current_page = $_REQUEST['offset'] / $_SESSION['recorded_paging'];
--- 267,273 ----
  
  <div id="recorded_pager">
  <?php
!     if (gettype($_SESSION['recorded_paging']) == "integer" && $_SESSION['recorded_paging'] > 0) {
          echo 'Pages - ';
          $total_pages = ceil(count($All_Shows)/$_SESSION['recorded_paging']);
          $current_page = $_REQUEST['offset'] / $_SESSION['recorded_paging'];
The problem seems to be that in 'set_session.php' (in the same directory), the 'Page recorded programs' drop down menu has the first element of the array being a string but the rest are integers, so when that session variable was tested (as $_SESSION['recorded_paging'] > 0), if the default first element of the drop down is active then you get an integer vs string causes an error which in turn causes the 'confirm_delete' function to not be loaded which is why you can't get the confirmation dialog.

I am not a PHP programmer so this may not be the best way to do this but it worked for me.
Post Reply