•  
      request #29255 PHP fatal error on artifact creation when submit miss required fields and use parent
    Infos
    #29255
    Manuel Vacelet (vaceletm)
    2022-10-26 16:08
    2022-10-26 15:10
    30711
    Details
    PHP fatal error on artifact creation when submit miss required fields and use parent

    Given a tracker that is part of hierarchy (as a child of something)
    And have required fields (eg. a select box)
    When a new artifact is created without value for the select box
    Then Tuleap crash (blank screen) with following error:

    2022/10/06 12:33:45 [error] 21042#21042: *10418 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Tracker_FormElement_Field_ArtifactLink::renderParentSelector(): Argument #1 ($prefill_parent) must be of type string, array given, called in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php on line 558 and defined in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php:440
    Stack trace:
    #0 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php(558): Tracker_FormElement_Field_ArtifactLink->renderParentSelector()
    #1 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php(1154): Tracker_FormElement_Field_ArtifactLink->fetchHtmlWidget()
    #2 /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.php(566): Tracker_FormElement_Field_ArtifactLink->fetchSubmitValue()
    #3 /usr/share/tuleap/plugins/tracker/include/Tracker/Art" while reading response header from upstream, client: 10.10.0.112, server:  request: "POST /plugins/tracker/?tracker=70&func=submit-artifact HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", "https://tuleap.example.com/plugins/tracker/?tracker=70&func=new-artifact"
    
    
    
    Trackers
    14.0
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    2022-10-26
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes