Upstream: https://we.phorge.it/T15762
Steps to reproduce:
- Make sure https://we.phorge.it/rPd5a28e12a005e7082dab685dd6e615da5213db33 is deployed.
- Set up a project tag project which includes a username mention @username in its project description and that user is not the currently logged in user.
- In a task comment, write the project tag #project.
- Hover over the project tag.
Since deploying upstream 2023.49 we experience quite some exceptions:
[2024-03-19 15:55:08] EXCEPTION: (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorProject, but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.\n\nData is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:283] #0 <#2> PhabricatorLiskDAO::assertAttachedKey(array, string) called at [<phorge>/src/applications/project/storage/PhabricatorProject.php:210] #1 <#2> PhabricatorProject::isUserMember(string) called at [<phorge>/src/applications/project/storage/PhabricatorProject.php:147] #2 <#2> PhabricatorProject::hasAutomaticCapability(string, PhabricatorUser) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:539] #3 <#2> PhabricatorPolicyFilter::checkCapability(PhabricatorProject, string) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:268] #4 <#2> PhabricatorPolicyFilter::apply(array) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilterSet.php:93] #5 <#2> PhabricatorPolicyFilterSet::resolveCapabilities() called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilterSet.php:54] #6 <#2> PhabricatorPolicyFilterSet::hasCapability(PhabricatorUser, PhabricatorProject, string) called at [<phorge>/src/applications/people/markup/PhabricatorMentionRemarkupRule.php:119] #7 <#2> PhabricatorMentionRemarkupRule::didMarkupText() called at [<phorge>/src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php:362] #8 <#2> PhutilRemarkupEngine::postprocessText(array) called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:164] #9 <#2> PhabricatorMarkupEngine::execute() called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:111] #10 <#2> PhabricatorMarkupEngine::process() called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:75] #11 <#2> PhabricatorMarkupEngine::renderOneObject(PhabricatorMarkupOneOff, string, PhabricatorUser, PhabricatorProject) called at [<phorge>/src/infrastructure/markup/view/PHUIRemarkupView.php:87] #12 <#2> phutil_tag(string, array, PHUIRemarkupView) called at [<phorge>/src/applications/project/view/PhabricatorProjectCardView.php:87] <--- ???? #13 <#2> phutil_escape_html(PhabricatorProjectCardView) called at [<phorge>/src/infrastructure/markup/render.php:139] #14 <#2> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97] #15 <#2> phutil_tag(string, array, array) called at [<phorge>/src/infrastructure/javelin/markup.php:70] #16 <#2> javelin_tag(string, array, array) called at [<phorge>/src/view/AphrontTagView.php:161] #17 <#2> AphrontTagView::render() called at [<phorge>/src/view/AphrontView.php:222] #18 <#2> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115] #19 <#2> phutil_escape_html(PHUIHovercardView) #20 <#2> array_map(string, array) called at [<phorge>/src/infrastructure/markup/render.php:185] #21 <#2> hsprintf(string, PHUIHovercardView) called at [<phorge>/src/aphront/response/AphrontResponse.php:326] #22 <#2> AphrontResponse::processValueForJSONEncoding(PHUIHovercardView, string) #23 <#2> array_walk_recursive(array, array) called at [<phorge>/src/aphront/response/AphrontResponse.php:342] #24 <#2> AphrontResponse::encodeJSONForHTTPResponse(array) called at [<phorge>/src/aphront/response/AphrontAjaxResponse.php:58] #25 <#2> AphrontAjaxResponse::buildResponseString() called at [<phorge>/src/aphront/response/AphrontResponse.php:70] #26 <#2> AphrontResponse::getContentIterator() called at [<phorge>/src/aphront/sink/AphrontHTTPSink.php:112] #27 <#2> AphrontHTTPSink::writeResponse(AphrontAjaxResponse) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:380] #28 <#2> AphrontApplicationConfiguration::writeResponse(AphrontPHPHTTPSink, AphrontAjaxResponse) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:303] #29 phlog(PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/handler/PhabricatorAjaxRequestExceptionHandler.php:27] #30 PhabricatorAjaxRequestExceptionHandler::handleRequestThrowable(AphrontRequest, PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #31 AphrontApplicationConfiguration::handleThrowable(PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:337] #32 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204] #33 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
This problem does not happen when backing out https://we.phorge.it/rPd5a28e12a005e7082dab685dd6e615da5213db33