Opened 6 years ago

Closed 6 years ago

#11697 closed Bug Report - General (Fixed)

Cannot add recording in MythWeb anymore

Reported by: Torsten Seyffarth <t.seyffarth@…> Owned by:
Priority: minor Milestone: 0.27.1
Component: Plugin - MythWeb Version: 0.26
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Hello all,

In MythWeb I cannot add a new recording anymore. It is neither working over the TV program nor over free or manually programming. I always get the attached error. With the desktop front end it is still working and it was also working a while ago with MythWeb. I cannot imagine, what I changed since than.

Best Torsten

Attachments (2)

Version.txt (801 bytes) - added by Torsten Seyffarth <t.seyffarth@…> 6 years ago.
Version information
Error.txt (18.1 KB) - added by Torsten Seyffarth <t.seyffarth@…> 6 years ago.
Error information

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by Torsten Seyffarth <t.seyffarth@…>

Attachment: Version.txt added

Version information

Changed 6 years ago by Torsten Seyffarth <t.seyffarth@…>

Attachment: Error.txt added

Error information

comment:1 Changed 6 years ago by mopp@…

The problem is related to php in the file Schedule.php "$this->findid = (date('U', $this->starttime)/60/60/24) + 719528;" It returns in your case [29] => 735434,62847222 But it should be 735434.62847222 With an english web interface everything works fine, but with a german interface you will run into the problem. So as a workaround use the english web interface.

comment:2 Changed 6 years ago by mopp@…

In the database findid is defined as INT(11). From my understanding the function even should not return 735434.62847222, it should be 735435. The following fix works with mythweb 0.26, but from my understanding 0.27 has exactly the same problem. The fix just rounds the findid to an interger number. But I'm not 100% for what findid is used for, so it might be a problem to round the number. On my system there a re some more bugs in 0.26 web interface, so I'll update to 0.27 soon.

--- mythweb/modules/tv/classes/Schedule.php.orig 2012-08-28 19:22:44.000000000 +0200 +++ mythweb/modules/tv/classes/Schedule.php 2013-10-01 07:40:12.829590366 +0200 @@ -247,7 +247,7 @@

Make sure that recordid is null if it's empty

if (empty($this->recordid)) {

$this->recordid = NULL;

  • $this->findid = (date('U', $this->starttime)/60/60/24) + 719528;

+ $this->findid = round(((date('U', $this->starttime)/60/60/24) + 719528), 0);

Only auto-default these properties if we're not dealing with a search-based recording rule, otherwise take the values we received from the custom schedule input form

comment:3 Changed 6 years ago by mopp@…

Patch with correct format.

--- mythweb/modules/tv/classes/Schedule.php.orig   2012-08-28 19:22:44.000000000 +0200
+++ mythweb/modules/tv/classes/Schedule.php        2013-10-01 07:40:12.829590366 +0200
@@ -247,7 +247,7 @@
     // Make sure that recordid is null if it's empty
         if (empty($this->recordid)) {
             $this->recordid = NULL;
-            $this->findid   = (date('U', $this->starttime)/60/60/24) + 719528;
+            $this->findid   = round(((date('U', $this->starttime)/60/60/24) + 719528), 0);
         // Only auto-default these properties if we're not dealing with a
         // search-based recording rule, otherwise take the values we
         // received from the custom schedule input form

comment:4 Changed 6 years ago by Torsten Seyffarth <t.seyffarth@…>

The patch works here. I get the same value for "findid" over MythWeb as with the desktop frontend. Thank you very much.

Still do not know why it worked in the past and then suddenly not. Maybe in the past mySQL did the rounding implicitly?

comment:5 Changed 6 years ago by hessijames@…

I can confirm that the patch is working with mythweb 0.27. The bug occurred here after an upgrade from opensuse 12.3 to 13.1, the mariadb server configuration seems to have gotten more strict.

comment:6 Changed 6 years ago by Karl Egly

Milestone: unknown0.27.1
Resolution: Fixed
Status: newclosed

fixed via #12038

Note: See TracTickets for help on using tickets.