Upstreaming from https://phabricator.wikimedia.org/T392168 as I can reproduce locally in latest git master in upstream.
- Have a parent project with a milestone named Sprint Chocolate Cake
- In a project with no workboard yet, select "Import Columns" to end up on http://phorge.localhost/project/board/1/import/
- See that typing the second token (Chocolate) shows no autocomplete project proposals
- Click the Magnifier button to Browse Projects
- Start typing any letter
[2025-05-12 14:31:14] EXCEPTION: (AphrontParameterQueryException) Array for %Ls conversion is empty. Query: projectPHID IN (%Ls) at [<phorge>/src/infrastructure/storage/xsprintf/qsprintf.php:383] arcanist(head=master, ref.master=29575b4f9187), phorge(head=master, ref.master=1f19cbf7486a) #0 <#2> qsprintf_check_type(array, string, string) called at [<phorge>/src/infrastructure/storage/xsprintf/qsprintf.php:155] #1 <#2> xsprintf_query(array, string, integer, array, integer) called at [<arcanist>/src/xsprintf/xsprintf.php:82] #2 <#2> xsprintf(string, array, array) called at [<phorge>/src/infrastructure/storage/xsprintf/PhutilQueryString.php:25] #3 <#2> PhutilQueryString::__construct(AphrontMySQLiDatabaseConnection, array) called at [<phorge>/src/infrastructure/storage/xsprintf/qsprintf.php:78] #4 <#2> qsprintf(AphrontMySQLiDatabaseConnection, string, array) called at [<phorge>/src/applications/project/query/PhabricatorProjectColumnQuery.php:189] #5 <#2> PhabricatorProjectColumnQuery::buildWhereClauseParts(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:505] #6 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildWhereClause(AphrontMySQLiDatabaseConnection) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:328] #7 <#2> PhabricatorCursorPagedPolicyAwareQuery::buildStandardPageQuery(AphrontMySQLiDatabaseConnection, string) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:302] #8 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRowsWithConnection(AphrontMySQLiDatabaseConnection, string) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:293] #9 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRows(PhabricatorProjectColumn) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:287] #10 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadStandardPage(PhabricatorProjectColumn) called at [<phorge>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:283] #11 <#2> PhabricatorCursorPagedPolicyAwareQuery::loadPage() called at [<phorge>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:251] #12 <#2> PhabricatorPolicyAwareQuery::execute() called at [<phorge>/src/applications/project/typeahead/PhabricatorProjectDatasource.php:59] #13 <#2> PhabricatorProjectDatasource::loadResults() called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:142] #14 <#2> PhabricatorTypeaheadDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:136] #15 <#2> PhabricatorTypeaheadCompositeDatasource::loadResultsForPhase(string, integer) called at [<phorge>/src/applications/typeahead/datasource/PhabricatorTypeaheadCompositeDatasource.php:48] #16 <#2> PhabricatorTypeaheadCompositeDatasource::loadResults() called at [<phorge>/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php:91] #17 <#2> PhabricatorTypeaheadModularDatasourceController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #18 phlog(AphrontParameterQueryException) called at [<phorge>/src/aphront/handler/PhabricatorAjaxRequestExceptionHandler.php:27] #19 PhabricatorAjaxRequestExceptionHandler::handleRequestThrowable(AphrontRequest, AphrontParameterQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:753] #20 AphrontApplicationConfiguration::handleThrowable(AphrontParameterQueryException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #21 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203] #22 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
Things blow up in https://we.phorge.it/source/phorge/browse/master/src/applications/project/query/PhabricatorProjectColumnQuery.php;25aebab655fdb50118b8dccc6a23981b8b43580b$188-193 :
if ($this->projectPHIDs !== null) is true though that array is empty.
Note that the checks if ($this->projectPHIDs) or if (!empty($this->projectPHIDs)) would return false here instead.
I also wonder why Phorge at this stage queries project columns. Maybe it filters for projects only which have boards? But that makes no sense if we have no projectPHID in the query?