I've recently updated EE to 2.5.5 and Matrix to 2.5.3, but now one of out in-house addons is broken. The addon is a custom fieldtype designed to be included in a Matrix field, but this now causes the publish page to turn blank. This is the only scenario in which this occurs; Matrix plays nicely with everything else, and our addon doesn't break anything when not included in a Matrix field.

I've tested this with a locally hosted version of EE 2.5.3, and got a PHP error rather than a blank page:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Content_publish::$tools_model

Filename: custom_fieldtype/ft.custom_fieldtype.php

Line Number: 271

Fatal error: Call to a member function get_upload_preferences() on a non-object in C:\Program Files\EasyPHP-12.1\www\EE\system\expressionengine\third_party\custom_fieldtype\ft.custom_fieldtype.php on line 271

Anyone know what's going on here?


It seems that Tool Model isn't being loaded before calling its property. Try by putting this line of code above the line number 271:

| improve this answer | |
  • Thank you! It took two weeks just to get that error message. – ninjachicken1 Apr 17 '13 at 9:14
  • Just ran into more problems in the code - turns out 'tools_model' is deprecated. I'm opening up a new question to fix this. – ninjachicken1 Apr 18 '13 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.