@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix two cache issues (global settings; initial setup)

Summary:
- Fixes T11995. This got moved but I missed renaming this callsite.
- Fixes T11993. If you have valid credentials, but haven't run `storage upgrade` yet, we can hit this exception during setup. Just ignore it instead.

Test Plan:
- Saved global settings, no more fatal.
- Changed `storage-namespace` to junk, loaded web UI with valid database credentials.

{F2106358}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11993, T11995

Differential Revision: https://secure.phabricator.com/D17024

+3 -7
+2 -6
src/applications/config/check/PhabricatorSetupCheck.php
··· 82 82 AphrontWriteGuard::allowDangerousUnguardedWrites(true); 83 83 } 84 84 85 - $caught = null; 86 85 try { 87 86 $db_cache = new PhabricatorKeyValueDatabaseCache(); 88 87 $db_cache->deleteKey('phabricator.setup.issue-keys'); 89 88 } catch (Exception $ex) { 90 - $caught = $ex; 89 + // If we hit an exception here, just ignore it. In particular, this can 90 + // happen on initial startup before the databases are initialized. 91 91 } 92 92 93 93 if ($use_scope) { 94 94 unset($unguarded); 95 95 } else { 96 96 AphrontWriteGuard::allowDangerousUnguardedWrites(false); 97 - } 98 - 99 - if ($caught) { 100 - throw $caught; 101 97 } 102 98 } 103 99
+1 -1
src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
··· 159 159 $user_phid); 160 160 } else { 161 161 $cache = PhabricatorCaches::getMutableStructureCache(); 162 - $cache->deleteKey(PhabricatorUserPreferences::getGlobalCacheKey()); 162 + $cache->deleteKey(PhabricatorUser::getGlobalSettingsCacheKey()); 163 163 164 164 PhabricatorUserCache::clearCacheForAllUsers( 165 165 PhabricatorUserPreferencesCacheType::KEY_PREFERENCES);