Opened 12 years ago

Closed 11 years ago

#3976 closed defect (fixed)

svn trunk: mythweb: creating a custom schedule with title search generates an invalid query

Reported by: anonymous Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: mythweb Version: 0.21-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

THis error appears in the backend log: 2007-09-16 16:32:26.890 Invalid search key in recordid 712.

Value entered in custom schedule screen:

default values title: %fudge%

Record id 712 in mythconverg:

recordid 712

type 4 chanid 1001 starttime 16:29:23 startdate 2007-09-16 endtime 16:29:24 enddate 2007-09-16 title %fudge% (Title Search) subtitle description category Custom recording profile Default recpriority 0 autoexpire 1 maxepisodes 0 maxnewest 0 startoffset 0 endoffset 0 recgroup Default dupmethod 6 dupin 15 station KYW seriesid programid search 2 autotranscode 0 autocommflag 1 autouserjob1 0 autouserjob2 0 autouserjob3 0 autouserjob4 0 findday 1 findtime 16:09:23 findid 733300 inactive 0 parentid 0 transcoder 0 tsdefault 1 playgroup Default prefinput 0 next_record 0000-00-00 00:00:00 last_record 0000-00-00 00:00:00 last_delete 0000-00-00 00:00:00 storagegroup Default avg_delay 100

Change History (8)

comment:1 Changed 12 years ago by Rob Smith

Owner: changed from Isaac Richards to Rob Smith
Status: newassigned

Do you get this with the current rev? I can't seem to reproduce.

comment:2 Changed 12 years ago by Rob Smith

Status: acceptedinfoneeded

comment:3 Changed 12 years ago by Rob Smith

Resolution: worksforme
Status: infoneededclosed

comment:4 Changed 11 years ago by simonwalls@…

I have reproduced this on 0.21-fixes svn 18900. The way it is provoked is to create a new custom search, specify a Title for the search, but not fill in the 'Search String' field.

This is easily done if you are in a hurry (and maybe it's the first time you've used that page). The 'Title' of the search and the 'string to search for' are often the same. The two form boxes are adjacent to each other and maybe you think that the second one is optional. Unfortunately there's not a check for a null string on the Search String when a Title Search is submitted.

I've included the contents of my mythconverg database for two examples, both were created in mythweb, but of these only item number 356 generates an "Invalid search key in recordid" message in mythbackend.log.

recordid        type      chanid  starttime        startdate       endtime         enddate         title     subtitle        description     category        profile recpriority     autoexpire      maxepisodes     maxnewest       startoffset     endoffset       recgroup        dupmethod       dupin   station seriesid        programid       search  autotranscode   autocommflag    autouserjob1    autouserjob2    autouserjob3    autouserjob4    findday findtime        findid  inactive        parentid        transcoder      tsdefault       playgroup       prefinput       next_record     last_record     last_delete     storagegroup    avg_delay
356  		   4       1001    22:19:22        2008-11-24      22:19:23        2008-11-24      Sky High (Title Search)                 Custom recording        Default 0       0       0       0       0       0       Default 6       15      BBC ONE                 2       0       1       0       0       0       0       1       22:11:22        733736  0       0       0       1       Default 0       0000-00-00 00:00:00     2008-11-26 19:49:15     0000-00-00 00:00:00     Default 100
368  		   4       1001    17:46:08        2008-11-27      17:46:09        2008-11-27      SkyHigh (Title Search)          sky high        Custom recording        Default 0       0       0       0       0       0       Default 6       15      BBC ONE                 2       0       1       0       0       0       0       1       17:11:08        733739  0       0       0       1       Default 0       0000-00-00 00:00:00     0000-00-00 00:00:00     0000-00-00 00:00:00     Default 100

You can see that the 'description' field is null on 356. This comes from the search string field on the mythweb page.

I don't have the ability right now to write a patch for mythweb that would check for a null Search String (in a Title Search only), but having that would avoid entries like 356 above getting in the database and causing the 'Invalid search key' message.

comment:5 Changed 11 years ago by simonwalls@…

Apologies, forgot to mention in the above post that the way it is provoked in Mythweb is to create a new custom search, specify a Title for the search, but not fill in the 'Search String' field.

The part needing attention is thus Mythweb ; but I haven't tried creating a Title Search with no searchstring from the frontend(s).

comment:6 Changed 11 years ago by Rob Smith

Component: mythtvmythweb
Keywords: svn.trunk removed
Milestone: 0.21
Resolution: worksforme
Status: closednew
Version: unknown0.21-fixes

comment:7 Changed 11 years ago by Rob Smith

Status: newaccepted

comment:8 Changed 11 years ago by Rob Smith

Resolution: fixed
Status: acceptedclosed

(In [20109]) Fixes #3976, uses the title as the description if it is not set

Note: See TracTickets for help on using tickets.