Project

General

Profile

Actions

Bug #66587

closed

Scheduler serialized task needs to be migrated for 7.x

Added by Xavier Perseguers almost 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Could have
Category:
scheduler
Target version:
-
Start date:
2015-04-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Fatal error: TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::listTasksAction(): The script tried to execute a method or
access a property of an incomplete object. Please ensure that the class definition "tx_scheduler_Execution" of the object you
are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in
/path/to/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php on line 1043

Problem is with this PHP block:

// Get execution type
if ($task->getExecution()->getInterval() == 0 && $task->getExecution()->getCronCmd() == '') {
    $execType = $this->getLanguageService()->getLL('label.type.single');
    $frequency = '-';
} else {
    $execType = $this->getLanguageService()->getLL('label.type.recurring');
    if ($task->getExecution()->getCronCmd() == '') {
        $frequency = $task->getExecution()->getInterval();
    } else {
        $frequency = $task->getExecution()->getCronCmd();
    }
}

This fails since $task->getExecution() is an incomplete PHP task:

The serialized task object is:

O:37:"Causal\IgLdapSsoAuth\Task\ImportUsers":10:{s:10:"*context";s:4:"both";s:16:"*configuration";i:0;s:23:"*missingUsersHandling";s:7:"nothing";s:24:"*restoredUsersHandling";s:7:"nothing";s:10:"*taskUid";i:7;s:11:"*disabled";b:1;s:12:"*execution";O:29:"TYPO3\CMS\Scheduler\Execution":6:{s:8:"*start";i:1424099520;s:6:"*end";i:1424099520;s:11:"*interval";i:0;s:11:"*multiple";i:0;s:10:"*cronCmd";s:0:"";s:23:"*isNewSingleExecution";b:0;}s:16:"*executionTime";i:1424099520;s:14:"*description";s:0:"";s:12:"*taskGroup";N;}

Files

incomplete.png (119 KB) incomplete.png Xavier Perseguers, 2015-04-25 14:12

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #84973: Cannot delete invalid Scheduler taskClosed2018-05-11

Actions
Actions #1

Updated by Xavier Perseguers almost 9 years ago

  • Description updated (diff)

Actually this is the record to reproduce the problem:

INSERT INTO `tx_scheduler_task` (`uid`, `crdate`, `disable`, `nextexecution`, `lastexecution_time`, `lastexecution_failure`, `lastexecution_context`, `serialized_task_object`, `serialized_executions`, `description`, `task_group`)
VALUES
            (18,1424099569,0,1424099520,0,'','',X'4F3A33373A2243617573616C5C49674C64617053736F417574685C5461736B5C496D706F72745573657273223A383A7B733A31303A22002A00636F6E74657874223B733A343A22626F7468223B733A31363A22002A00636F6E66696775726174696F6E223B693A303B733A32333A22002A006D697373696E67557365727348616E646C696E67223B733A373A226E6F7468696E67223B733A32343A22002A00726573746F726564557365727348616E646C696E67223B733A373A226E6F7468696E67223B733A31303A22002A007461736B556964223B693A373B733A31313A22002A0064697361626C6564223B623A303B733A31323A22002A00657865637574696F6E223B4F3A32323A2274785F7363686564756C65725F457865637574696F6E223A363A7B733A383A22002A007374617274223B693A313432343039393532303B733A363A22002A00656E64223B693A313432343039393532303B733A31313A22002A00696E74657276616C223B693A303B733A31313A22002A006D756C7469706C65223B693A303B733A31303A22002A0063726F6E436D64223B733A303A22223B733A32333A22002A0069734E657753696E676C65457865637574696F6E223B623A303B7D733A31363A22002A00657865637574696F6E54696D65223B693A313432343039393532303B7D',NULL,'',0);
Actions #2

Updated by Xavier Perseguers almost 9 years ago

  • Subject changed from Scheduler module crashes to Scheduler serialized task needs to be migrated for 7.x
  • Category set to scheduler
  • Priority changed from Should have to Could have
  • PHP Version set to 5.6

Problem is thus related to the serialized object "tx_scheduler_Execution" which is only available with compatibility6 extension. Serialized tasks information should be automatically migrated during the upgrade phase from 6.2 to 7.x. I guess this must be an old scheduler record coming from 4.5 but I suspect that I never edited it again...

Actions #3

Updated by taywa gmbh about 8 years ago

same here, for an updated installation 4.5->6.2-> 7 LTS.

Just truncated tx_scheduler_task table, error gone (make backup first)

Actions #4

Updated by Michael Oehlhof over 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Michael Oehlhof
Actions #5

Updated by Gerrit Code Review over 6 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55142

Actions #6

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55142

Actions #7

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55142

Actions #8

Updated by Gerrit Code Review about 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55142

Actions #9

Updated by Gerrit Code Review about 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55142

Actions #10

Updated by Gerrit Code Review about 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55683

Actions #11

Updated by Michael Oehlhof about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Gerrit Code Review about 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55685

Actions #13

Updated by Gerrit Code Review about 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55686

Actions #14

Updated by Frank Nägler about 6 years ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Mathias Brodala almost 6 years ago

  • Related to Bug #84973: Cannot delete invalid Scheduler task added
Actions #16

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF