User Profile form does not load latest revision when it is not the default one

Created on 10 September 2021, about 3 years ago
Updated 1 June 2023, over 1 year ago

Problem/Motivation

Latest revision is not loaded on the profile.user_page.single when it is not the default one, so mostly with Workflows and Content Moderation enabled for a given Profile type.
This could confuse users that are editing from this route as they will not have the latest content and start editing from the latest default revision.
This does not happen with the entity.profile.edit_form route, only with the profile.user_page.single one.

Steps to reproduce

  • Create a new Profile type, check Allow profiles of this type to be revisioned then add a field
  • Enable Workflows and Content moderation modules
  • Edit the default Editorial Workflow and apply it to this Profile type
  • Go to the UserConroller::singlePage route (profile.user_page.single), so /user/{user}/{profile_type}
  • Populate a field and save as « Draft » moderation state
  • Go back to the above route - field is empty
  • Populate again, save as « Published » moderation state, go back, field is not empty anymore
  • Add a new value, save again as « Draft », go back, previous published value is loaded, current state is Published instead of Draft
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇭Switzerland colorfield Lausanne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇵🇭Philippines bryanmanalo

    This was really helpful @colorfield. Thank you very much!

    I also need the patch from @Ludo.R , with slight modification, as this is incompatible with that patch created there.

Production build 0.71.5 2024