[2.0.0-beta5] Sources bad on derivable contexts should validate the default option

Created on 17 November 2024, 12 months ago

Problem/Motivation

thanks to @smovs in 📌 [2.0.0-beta5] Preselect option when only one available Active , a little bug has been found when switching from sources which are both derivable contexts (see comment #6).

Error like :
The submitted value xxxx in the Referenced entities element is not allowed.
where xxxx is the derivable_context selected with the old source injected into the default value for derivable context of the new source.

Let's tackle this with proper checks in DerivableContextSourceBase

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France just_like_good_vibes PARIS

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

Merge Requests

Comments & Activities

  • Issue created by @just_like_good_vibes
  • Pipeline finished with Success
    12 months ago
    Total: 340s
    #341543
  • 🇫🇷France just_like_good_vibes PARIS

    That was quite hard to do in fact, harder than i thought because of the way and order in which the form is processed.
    The bug really only occurs in prop forms, when a switch source is triggered from the select source.
    the input of the old source is getting submitted through the ajax handler and it is difficult to clean the data, early at the appropriate moment, before the bug is thrown (invalid value for the select). unfortunately, it seems not really doable in the prop form, which would have been a good place. Like when we switch source for prop, we then clean the "source" settings.

    so i propose for now this implementation, only in the derivableContext source.
    As soon as the invalid value is detected, it is cleaned and then we had to cover the ongoing form validation process.
    The value needed to be clean, but not in form state values unfortunately but rather in form state input (because they are latter processed to overwrite the form state values).

  • First commit to issue fork.
  • 🇫🇷France pdureau Paris

    i ill merge as soon as the pipeline is run

  • Pipeline finished with Success
    11 months ago
    Total: 304s
    #344721
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Canceled
    9 months ago
    Total: 114s
    #425053
  • Pipeline finished with Canceled
    9 months ago
    Total: 73s
    #425149
  • Pipeline finished with Canceled
    8 months ago
    Total: 133s
    #434448
  • Pipeline finished with Success
    8 months ago
    Total: 150s
    #434755
  • Pipeline finished with Success
    8 months ago
    Total: 140s
    #447592
  • Pipeline finished with Success
    8 months ago
    Total: 165s
    #447597
  • Pipeline finished with Failed
    5 months ago
    Total: 672s
    #507893
  • Pipeline finished with Failed
    5 months ago
    Total: 465s
    #507915
  • Pipeline finished with Success
    5 months ago
    Total: 336s
    #507917
  • Pipeline finished with Success
    2 months ago
    #585222
  • Pipeline finished with Success
    about 1 month ago
    Total: 325s
    #606861
  • Pipeline finished with Success
    about 1 month ago
    #613333
  • Pipeline finished with Success
    about 18 hours ago
    Total: 481s
    #644711
  • Pipeline finished with Success
    about 18 hours ago
    Total: 373s
    #644722
  • Pipeline finished with Success
    about 18 hours ago
    Total: 527s
    #644735
Production build 0.71.5 2024