jonom / silverstripe-focuspoint

Module for improving automatic image cropping in SilverStripe. Adds simple art-direction control by allowing you to set and crop from a focus point instead of the centre point of an image.
MIT License
109 stars 48 forks source link

Set name after parent construct #116

Open RVXD opened 1 year ago

RVXD commented 1 year ago

In php8.1 version of Silverstripe Framework 4.12.7 'name' falls back to autogenerated name from 'title'. This results in name 'Focuspoint' instead of 'FocusPoint'. Result is that the db field is not found, causing an error in asset browser. If name is set after the construct call the issue this is solved.

jonom commented 1 year ago

Hi @RVXD, sorry for the slow reply. I wasn't able to replicate this issue on SS4 (focuspoint 4.0.5) or SS5 (focuspoint 5.0.0) with PHP 8.1. Is this still a problem for you if you update to the latest version of SS4?

jonom commented 1 year ago

p.s. part of the reason for pushing back is that making a change to the master branch won't help you if you are using SS4, as the master branch is targeting SS5.