Opened 8 years ago

Closed 4 years ago

#12795 closed Bug Report - General (Fixed)

Never Record button in the mythweb/tv/detail/ page results in an sql exception error

Reported by: scottn@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: unknown
Component: Plugin - MythWeb Version: 0.28.0
Severity: medium Keywords: Never Record SQL Error crash
Cc: Ticket locked: no

Description

  1. Select a program in listings that you want to never record.
  2. On the page that comes up click the "Never Record" button
  3. The page will crash.

Has only appeared since I upgraded to 0.28. 0.27 did not have this problem.

Attachments (1)

Fatal_Error_Column_inetref_cannot_be_null.html (12.5 KB) - added by scottn@… 8 years ago.
Page displayed after crash

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by scottn@…

Page displayed after crash

comment:1 Changed 8 years ago by Stuart Auchterlonie

Status: newinfoneeded_new

Have you upgraded the mythweb packages too?

comment:2 in reply to:  1 Changed 8 years ago by scottn@…

Replying to stuarta:

Have you upgraded the mythweb packages too?

Hi

Yes. I also have done an upgrade again today just to make sure but it still happens. I'm running mythweb version:

root@mythtv:~# dpkg -l | grep mythweb ii mythweb 2:0.28.0+fixes.20160603.23eba05-0ubuntu0mythbuntu5 all Web interface add-on module for MythTV

Hope this helps.

Thanks Scott

comment:3 Changed 8 years ago by scottn@…

Upgraded to Mythbuntu 16.04.1 in the past couple of days and still getting this issue so now running version 2:0.28.0+fixes.20160727.e5ce273-0ubuntu0mythbuntu5.

I have worked around this issue but running the following SQLs:

SET SESSION sql_mode = 'NO_ZERO_DATE';

Required otherwise it complains about starttime and endtime having a defaul value of "0000-00-00 00:00:00"

alter table oldrecorded modify column inetref varchar(40) null;

Table schema now looks as follows and Never Record works again:

mysql> describe oldrecorded;
+-------------+------------------+------+-----+---------------------+-------+
| Field       | Type             | Null | Key | Default             | Extra |
+-------------+------------------+------+-----+---------------------+-------+
| chanid      | int(10) unsigned | NO   | MUL | 0                   |       |
| starttime   | datetime         | NO   | PRI | 0000-00-00 00:00:00 |       |
| endtime     | datetime         | NO   | MUL | 0000-00-00 00:00:00 |       |
| title       | varchar(128)     | NO   | PRI |                     |       |
| subtitle    | varchar(128)     | NO   | MUL |                     |       |
| description | varchar(16000)   | NO   | MUL |                     |       |
| season      | smallint(5)      | NO   |     | NULL                |       |
| episode     | smallint(5)      | NO   |     | NULL                |       |
| category    | varchar(64)      | NO   |     |                     |       |
| seriesid    | varchar(64)      | YES  | MUL | NULL                |       |
| programid   | varchar(64)      | YES  | MUL | NULL                |       |
| inetref     | varchar(40)      | YES  |     | NULL                |       |
| findid      | int(11)          | NO   |     | 0                   |       |
| recordid    | int(11)          | NO   | MUL | 0                   |       |
| station     | varchar(20)      | NO   | PRI |                     |       |
| rectype     | int(10) unsigned | NO   |     | 0                   |       |
| duplicate   | tinyint(1)       | NO   |     | 0                   |       |
| recstatus   | int(11)          | NO   | MUL | 0                   |       |
| reactivate  | smallint(6)      | NO   |     | 0                   |       |
| generic     | tinyint(1)       | NO   |     | NULL                |       |
| future      | tinyint(1)       | NO   | MUL | 0                   |       |
+-------------+------------------+------+-----+---------------------+-------+
21 rows in set (0.01 sec)

Hope this helps.

Thanks Scott

comment:4 Changed 7 years ago by sphery

Component: MythTV - GeneralPlugin - MythWeb

Dup of #12868 .

Scott, you need to fix your schema--change it back to the way it was--or MythTV may fail to work properly.

comment:5 Changed 4 years ago by paul-h

Owner: set to Stuart Auchterlonie
Status: infoneeded_newassigned

Looks like it need a similar fix for starttime and endtime as this one https://code.mythtv.org/trac/changeset/7b469b2fa6408f178e19726f67a5797e58b244c8/mythweb

comment:6 Changed 4 years ago by Stuart Auchterlonie

Resolution: Fixed
Status: assignedclosed

This is has been fixed.

Note: See TracTickets for help on using tickets.