stable

Clone or download

Read-only

fix: Warning with invalid request for async renderer

We got this in the logs: > FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "prefill_edited_types" in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php on line 877" while reading response header from upstream, client: 66.249.64.109, server: tuleap.net, request: "POST /plugins/tracker/?func=artifactlink-renderer-async&formElement=1729&renderer_data={%22artifact_id%22:9960,%22tracker_id%22:146,%22reverse_artifact_links%22:false,%22read_only%22:true,%22from_aid%22:9960,%22prefill_removed_values%22:[],%22prefill_edited_natures%22:[]} HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "tuleap.net", referrer: "https://tuleap.net/plugins/tracker/?aid=9960" After analysing the code we didn't find any occurrence of `prefill_edited_natures` since [it has been renamed][1]. We suspect that this is probably an old tab that is open somewhere with old version of scripts and try to reach Tuleap with a now invalid request. However Tuleap should not raise a warning when it encounters such request. You can test this by playing with `Edit and Resend` feature in the network tab of your browser console. If you rename `prefill_edited_types` to the former version `prefill_edited_natures`, then the request should not raise an error. Part of story #23042: have "parent" as type within artifacts links [1]: git #tuleap/stable/47d85e757c9e0f5530955a027e0839e475d9993d Change-Id: I038feabd12d7c6ef052fcbf3e5aaba1c5cab0fc9

Modified Files

Name
M plugins/artifactsfolders/include/Folder/DataFromRequestAugmentor.php +3 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php +14 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLinkTest.php +29 −0 Go to diff View file
M src/common/include/Codendi_Request.class.php +1 −1 Go to diff View file