silverstripe / silverstripe-blog

Blog module for Silverstripe CMS
http://silverstripe.org/blog-module
BSD 2-Clause "Simplified" License
103 stars 169 forks source link

Member BlogProfileImage doesn't get published unless FirstName/Surname is changed #748

Closed purplespider closed 8 months ago

purplespider commented 8 months ago

Module version(s) affected

4.1.2

Description

Due to the order in onBeforeWrite, the BlogProfileImage added in BlogMemberExtension doesn't get automatically published unless you have also changed the member's name (unlikely).

Is there a reason that $owns isn't used to ensure the image gets published here?

How to reproduce

  1. Create a new user in Security.
  2. Click Create
  3. Upload a new "Blog profile image" for the user.
  4. Click Save

What I expect to happen: The image gets published. What actually happens: The image stays as "Draft".

Possible Solution

No response

Additional Context

No response

Validations

PRs