Opened 14 years ago

Closed 14 years ago

#1118 closed defect (fixed)

mythweb: editing power search yeilds sql error

Reported by: jonese@… Owned by: xris
Priority: minor Milestone: 0.19
Component: mythweb Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If I use mythweb and edit a previously created Power Search (that I used mythfrontend to create) and I re-save it ('caused I changed something) I get a popup error:

There is an error in your customer SQL query: Table 'mythconverg.musicmetadata' desn't exist 1146

I don't have mythmusic plugin installed.

Change History (9)

comment:1 Changed 14 years ago by xris

could you give a little more detail about the power search... like what you're searching for, etc?

comment:2 Changed 14 years ago by xris

also, please make sure you're running the latest mythweb... particularly, delete the "includes" and "modules/" directories and run svn update to redownload them.

comment:3 Changed 14 years ago by jonese@…

Further details...

I deleted my mythweb and grabbed a fresh copy of mythweb svn and installed in my web server directory (under /mythtv). Here's the steps to for me to create the error:

1) go to "Custom" link of Recording Schedules 2) Search Type: "Power Search" 3) Title: "test" 4) Search Phrase: "program.title like '%test%'" 5) Select "Create Schedule"

Error will popup as "There is an error in your customer SQL query: Table 'mythconverg.musicmetadata' doesn't exist 1146"

comment:4 Changed 14 years ago by xris

ok, I think the problem is that the error is left over from a previous database query (I didn't see it because I have mythmusic installed). Going to commit a change shortly to address this.

comment:5 Changed 14 years ago by xris

Resolution: fixed
Status: newclosed

(In [8758]) wipe errors so that future checks for errors don't trip up on them -- should close #1118

comment:6 Changed 14 years ago by jonese@…

Resolution: fixed
Status: closedreopened

The previous patch did clear the sql error. However, I noticed a further error. I was temped to open a new ticket, but this is very close to the same original problem.

If when creating a Custom Recording Schedule and you select:

Schedule Options: "Find and record one showing of this title"

the schedule will not be entered (and if you're editing a previously created schedule and happen to resubmit it, the existing schedule with be deleted!!!).

If you had selected "Record at any time on any channel" the schedule creation/edit appears to work properly.

comment:7 Changed 14 years ago by derek@…

I actually noticed this when writing my patch for #1144, but forgot about it until I read this ticket. The problem, I believe, is on line 52 of mythweb/modules/tv/schedules_custom.php:

Is: case rectype_once: Should be: case rectype_findone:

The other issue that caught my eye is that if the code chooses to ignore the schedule in this case statement then it sets the $_POSTrecord? value to zero. I found this odd because a value of zero means to delete the rule, which explains the behaviour described. I'd suggest just bailing out with a reload and a JS alert saying 'request ignored' or something like that. I think deleting the rule is the incorrect path in this case, but didn't touch the code because I'm not sure if there's a reason for the choice. But changing the one line above should fix the bug described.

comment:8 Changed 14 years ago by xris

Thanks for catching this.. Was out all day yesterday with a system reinstall/upgrade for my wife.

comment:9 Changed 14 years ago by xris

Resolution: fixed
Status: reopenedclosed

(In [8766]) close #1118

Note: See TracTickets for help on using tickets.