Steps to reproduce:
- Phorge master at `cef12d8dc202decc7f4088cb3402f73d74c452f3, PHP 8.2.10
- Go to http://phorge.localhost/config/edit/maniphest.custom-field-definitions/
- Set the empty Database Value to
{ "deadline.due": { "name": "Due Date", "view": true, "edit": true, "description": "Deadline for completing the task.", "search": true, "fulltext": true, "type": "date", "copy": false } }
- Select Save Config Entry
- Go to http://phorge.localhost/maniphest/query/advanced/ and select search criteria which will result in more than 100 results
- Set Order By to Due Date (reversed)
- Click the Search button
- On the results page, scroll down and click the Next button (which results in an URL like http://phorge.localhost/maniphest/query/JA6ufSF1vjSX/?after=220 )
Expected outcome:
Results.
Actual outcome:
As most or all results will have no Due Date set, an exception is shown instead:
[2023-09-02 14:05:35] EXCEPTION: (Exception) Map returned by "newPagingMapFromCursorObject()" in class "ManiphestTaskQuery" omits required key "custom.deadline.due". at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:229] arcanist(head=customOAuthUrlencodeNull, ref.master=df6c315ace5f, ref.customOAuthUrlencodeNull=c69b9749027f), phorge(head=master, ref.master=cef12d8dc202) #0 <#2> PhabricatorCursorPagedPolicyAwareQuery::getPagingMapFromCursorObject(PhabricatorQueryCursor, array) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:660] #1 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildPagingClause(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:593] #2 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildPagingWhereClause(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:515] #3 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/applications/maniphest/query/ManiphestTaskQuery.php:355] #4 <#2> ManiphestTaskQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:505] #5 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClause(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/applications/maniphest/query/ManiphestTaskQuery.php:244] #6 <#2> ManiphestTaskQuery::loadPage() called at [<phorge>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:251] #7 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:400] #8 <#2> PhabricatorCursorPagedPolicyAwareQuery::executeWithCursorPager(AphrontCursorPagerView) called at [<phorge>/src/applications/search/engine/PhabricatorApplicationSearchEngine.php:1038] #9 <#2> PhabricatorApplicationSearchEngine::executeQuery(ManiphestTaskQuery, AphrontCursorPagerView) called at [<phorge>/src/applications/search/controller/PhabricatorApplicationSearchController.php:256] #10 <#2> PhabricatorApplicationSearchController::processSearchRequest() called at [<phorge>/src/applications/search/controller/PhabricatorApplicationSearchController.php:91] #11 <#2> PhabricatorApplicationSearchController::processRequest() called at [<phorge>/src/aphront/AphrontController.php:29] #12 <#2> AphrontController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71] #13 <#2> AphrontController::delegateToController(PhabricatorApplicationSearchController) called at [<phorge>/src/applications/maniphest/controller/ManiphestTaskListController.php:20] #14 <#2> ManiphestTaskListController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #15 phlog(Exception) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] #16 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, Exception) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #17 AphrontApplicationConfiguration::handleThrowable(Exception) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #18 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203] #19 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
Other comments:
Upstreaming from https://phabricator.wikimedia.org/T344241