Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3199 closed patch (fixed)

Mythweb: Error-messages with new queue-job buttons (Ticket #2718)

Reported by: anonymous Owned by: xris
Priority: minor Milestone: unknown
Component: mythweb Version: 0.20
Severity: medium Keywords: Jobqueue
Cc: Ticket locked: no

Description

While trying to use the new queue-job buttons on recorded programs (see ticket #2718) I got a few error-messages entering the Recording-Details page.

Error at /var/www/mythtv/mythweb/includes/jobqueue.php, line 102:
constant(): Couldn't find constant UserJob1

Error at /var/www/mythtv/mythweb/includes/jobqueue.php, line 102:
constant(): Couldn't find constant UserJob2

Error at /var/www/mythtv/mythweb/includes/jobqueue.php, line 102:
constant(): Couldn't find constant UserJob3

Error at /var/www/mythtv/mythweb/modules/_shared/tmpl/default/header.php, line 16:
Cannot modify header information - headers already sent by (output started at /var/www/mythtv/mythweb/includes/errors.php:117)

Then I took the sql-query ...

SELECT SUBSTR(j.value, 8,1) AS jnum,
       d.data               AS name
FROM settings AS j,
     settings AS d
WHERE d.value = CONCAT("UserJobDesc", SUBSTR(j.value, 8,1))
  AND LENGTH(IFNULL(j.data, "")) > 0
  AND j.value LIKE "UserJob_"
ORDER BY jnum

... of jobqueue.php and executed it in phpMyAdmin which brought me this error-message:

#1305 - FUNCTION mythconverg.SUBSTR does not exist 

After correcting the query in changing SUBSTR to SUBSTRING the recording-details-page still throwing the errors.

I reviewed the source file again and found the line

    while ($row = $sh->fetch_assoc()) {
        $Jobs[constant('UserJob'.$row['jnum'])] = $row['name'];
    }

A constant UserJob1 etc is not defined. After changing UserJob? into 'JOB_USERJOB' it works for me. Put all this in a diff attached to this ticket.

Attachments (2)

JobQueue.diff (895 bytes) - added by gosarderreisende@… 17 years ago.
Correction to JobQueue?.php
JobQueue2.diff (1.0 KB) - added by gosarderreisende@… 17 years ago.
correct Version of Diff-File

Download all attachments as: .zip

Change History (5)

Changed 17 years ago by gosarderreisende@…

Attachment: JobQueue.diff added

Correction to JobQueue?.php

Changed 17 years ago by gosarderreisende@…

Attachment: JobQueue2.diff added

correct Version of Diff-File

comment:1 Changed 17 years ago by anonymous

Damned ...Sorry... wrong diff!!! This is the correct one... JobQueue2.diff

comment:2 Changed 17 years ago by xris

Resolution: fixed
Status: newclosed

Fixed by greg in [13021]

comment:3 Changed 17 years ago by xris

(In [13025]) Fix constant name, re #3199

Note: See TracTickets for help on using tickets.