I upgraded from EE2.5.2 to EE2.7.2. I had the old individual P&T Dive Bar fields installed. I'm trying to upgrade to the new Field pack as per the instructions, but I can't access the Add-ons > Fieldtypes screen due to the following error:

Fatal error: Class PT_Fieldtype contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (EE_Fieldtype::display_field) in /var/www/vhosts/snip/subdomains/stage/system/expressionengine/third_party/pt_field_pack/pt_fieldtype.php on line 148

How can I bypass / fix this error so I can install the new fields?

Thanks in advance.


This could arguably be a duplicate of this question, but it's a bit different because you're asking how to silence the error so you can finish the update per the P&T docs.

I just ran into this today myself and had the same question! The solution is courtesy of this answer.

Open up pt_fieldtype.php and below the constructor (around line 29) add:

public function display_field($data)
    // This placeholder function will prevent the PHP error

This will prevent the error and allow you to get on with the upgrade.

OR as Andris pointed out below, you can simply delete the old pt_fieldtype files and the error will go away so that you'll be able to install the new field pack.

  • 1
    Also you could just delete the old fieldtype folders, but some people might feel reluctant about that. Oct 25 '13 at 8:09
  • Thanks, @Andris. I totally thought that deleting the files of an installed fieldtype would result in a missing fieldtype error in the control panel, but I see that it doesn't. I updated my answer.
    – Alex Kendrick
    Oct 25 '13 at 14:59
  • 1
    FWIW, just deleting the old folders did not fix this problem for me. It did exactly what you assumed and just gave me a missing filetype error. Also critically, this thread (unlike the original one you credit) includes WHERE you're supposed to put this information, so thanks very much.
    – grovberg
    Nov 8 '13 at 22:24
  • This allowed me to load the fieldtypes page. However, now when I install the switch, pill and list fieldtypes (in the modern Field Pack, not old P&T Field Pack) I get this error: dropbox.com/s/7xcvvmc4bmg520y/…
    – jthomas
    Nov 26 '13 at 23:28
  • @jthomas, I think it would be better if you post this issue as a new question (easier to tackle that way than via comments).
    – Alex Kendrick
    Nov 27 '13 at 1:39

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.