Project

General

Profile

Actions

Bug #25687

closed

Fatal error "The script tried to execute a method or access a property of an incomplete object"

Added by Graham Solomon almost 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2011-01-18
Due date:
% Done:

0%

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

Description

I have written an extension which has a scheduled task for sending out email notifications, this worked flawlessly with version 4.4 but now I receive the following error message in the Scheduler module.

Not sure if this is a bug or if I need to amend my code for the coming v4.5

Fatal error: tx_scheduler_Module::listTasks() [<a href='http://uk.php.net/manual/en/tx-scheduler-module.listtasks.php&#039;&gt;tx-scheduler-module.listtasks.php&lt;/a&gt;]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Swift_RfcComplianceException" 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 /usr/local/typo3/TYPO3_4-4.svn/typo3/sysext/scheduler/mod1/index.php on line 1153

(issue imported from #M17122)

Actions #1

Updated by Francois Suter almost 14 years ago

So far all work I've done with the Scheduler in 4.5 worked flawlessly so I would suspect it's your extension that has a problem, but I can't say for sure.

Are you using a site that you migrated from 4.4 to 4.5 and the task was already registered? Maybe it's a problem that happens upon migration. Or does it happen with a task that you registered after the site was installed (or migrated)? Does it also happen if you create a new instance of the task? Did you by any chance make changes to your task's class and added a new method?

Actions #2

Updated by Graham Solomon almost 14 years ago

Hi Francois,

It is indeed a website which I have upgraded from 4.4, the task was registered with the 4.4 installation, the extension was unmodified after the upgrade and simply did not work anymore which is why my hunch is this is a bug (I maybe wrong).

Looking at the message I may have neglected to mention how this was caused so let me explain the steps.

1. Working 4.4 installation, scheduled task runs fine and sends emails to editors & admins
2. Upgraded to 4.5
3. I ran the task which as I mentioned sends emails to both editors/admins, sometimes these roles overlap, e.g. I have an editor and an admin account, it threw an exception saying that my mail did not conform to RFC <somthing>, possibly because the "To:" was ', '
4. Now whenever I access the scheduler module I am faced with the above mentioned fatal error

So it is probably something to do with the exception thrown caused by the email especially given the class reference in the error 'Swift_RfcComplianceException'.

Hope this makes sense.

Actions #3

Updated by Graham Solomon almost 14 years ago

Clearing the 'lastexecution_failure' field for the task restores the module back to normal so I guess there is a problem with the array being stored in there when 'Swift_RfcComplianceException' encounters an error, may not be a bug with the scheduler itself.

Actions #4

Updated by Francois Suter almost 14 years ago

Hi Graham, thanks for the details.

I think I have an idea what's wrong. In TYPO3 4.5 a whole new API was introduced for sending mails, based on the SwiftMailer class (see http://swiftmailer.org/). This is more powerful, but also more strict than before. I guess that's why you suddenly get an eror.

So I would say you have to update your task to properly use the new API. There's some documentation here: http://wiki.typo3.org/Pending_Documentation#t3lib_mail

Please report if this solved your problem and if this bug can be closed.

Actions #5

Updated by Graham Solomon almost 14 years ago

Hi Francois,

I can confirm that after updating my mailer function to use the new API this problem is resolved.

I assume this will be detailed in the release notes once 4.5 is released.

Graham

Actions #6

Updated by Francois Suter almost 14 years ago

Not a Scheduler bug.

Thanks for the feedback, Graham.

Actions #7

Updated by Michael Stucki almost 11 years ago

  • Category set to scheduler
Actions #8

Updated by Michael Stucki almost 11 years ago

  • Project changed from 739 to TYPO3 Core
  • Category changed from scheduler to scheduler
  • Target version deleted (0)
Actions

Also available in: Atom PDF