Jump to content

Recommended Posts

Posted

Hi,

I've several Websites running ProcessWire 3.0.200 and PHP 8 without problems - but one of these gives me an error:

Fatal Error:  Class ProcessWire\FieldtypeImage contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (ProcessWire\FieldtypeHasFiles::hasFiles, ProcessWire\FieldtypeHasFiles::getFilesPath) (line 18 of /var/www/.../wire/modules/Fieldtype/FieldtypeImage/FieldtypeImage.module)

Can someone clearify this and help?

Thank you, regards
Sebastian

Posted

Hm, I've fixed the error by adding this two lines to /wire/modules/Fieldtype/FieldtypeImage/FieldtypeImage.module: 

public function hasFiles(Page $page, Field $field){}
public function getFilesPath(Page $page, Field $field){}

Now the Website is running again - but what's the reason for this strange thing?

Regards
Sebastian

Posted

Sounds like an incomplete upload (with FieldtypeFile.module being an older version that lacks those method implementations, otherwise FieldtypeImage would inherit them).

  • Like 1
Posted

Apparently it was a side effect of the PHP memory_limit being too low. I increased this value and now it works without problems.

Regards
Sebastian

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...