Page MenuHomePhabricator

Config becomes inaccesible after changing visibility when all spaces are archived
Open, Needs TriagePublic

Description

Reproduction Steps:

  1. Have some spaces, archive all of them, including the default one.
  2. Log in as Administrator
  3. Create a new repo
  4. Go to Diffusion -R* (where * is the name of the repo) -Edit -Edit Policies and press save.

Expected result:

  • The visibility gets changed and you get returned to the repo.
  • Next time you enter the edit menu it actually opens

Actual result:

  • An exception pops up after saving: Transaction ("PHID-XACT-REPO-zsj42jcwxpqm2z5", of type "core:space") requires a handle ("") that it did not load. (ID changes of course)
  • Next time you open the edit menu, same exception. Does not carry over to other repos.

Version info:

phabricator

dd1023e5a8f8aca512c798b9645e5dfe33edb87d (Sat, Apr 16)

arcanist

737f5c0df976fe2b3178aac6ab7feb3d3621d99e (Sat, Apr 9)

phutil

1ea69b48e36d8411c329559b593772ae51a2e6f9 (Sat, Apr 16)

Host info:
Raspberry Pi 2 (budget constraints) running Gentoo, lighttpd 1.4.35-r1, php 5.6.19, mariadb 10.0.23

Related Objects

Event Timeline

Forgot to add a piece of the log, this may help:

2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr: [2016-04-16 19:52:16] EXCEPTION: (Exception) Transaction ("PHID-XACT-REPO-zsj42jcwxpqm2z5", of type "core:space") requires a handle ("") that it did not load. at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:310]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr: arcanist(head=master, ref.master=737f5c0df976), phabricator(head=master, ref.master=dd1023e5a8f8), phutil(head=master, ref.master=1ea69b48e36d)
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #0 <#2> PhabricatorApplicationTransaction::getHandle(NULL) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:335]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #1 <#2> PhabricatorApplicationTransaction::renderHandleLink(NULL) called at [<phabricator>/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:806]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #2 <#2> PhabricatorApplicationTransaction::getTitle() called at [<phabricator>/src/applications/repository/storage/PhabricatorRepositoryTransaction.php:492]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #3 <#2> PhabricatorRepositoryTransaction::getTitle() called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:429]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #4 <#2> PhabricatorApplicationTransactionView::renderEvent(PhabricatorRepositoryTransaction, array) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:173]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #5 <#2> PhabricatorApplicationTransactionView::buildEvents(boolean) called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:220]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #6 <#2> PhabricatorApplicationTransactionView::buildPHUITimelineView() called at [<phabricator>/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:200]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #7 <#2> phutil_escape_html(array) called at [<phutil>/src/markup/render.php:157]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #8 <#2> phutil_escape_html(array) called at [<phutil>/src/markup/render.php:119]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #9 <#2> phutil_tag(string, array, array) called at [<phabricator>/src/view/phui/PHUITwoColumnView.php:167]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #10 <#2> PHUITwoColumnView::buildMainColumn() called at [<phabricator>/src/view/phui/PHUITwoColumnView.php:103]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #11 <#2> PHUITwoColumnView::getTagContent() called at [<phabricator>/src/view/AphrontTagView.php:152]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #12 <#2> AphrontTagView::render() called at [<phabricator>/src/view/AphrontView.php:222]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #13 <#2> AphrontView::producePhutilSafeHTML() called at [<phutil>/src/markup/render.php:133]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #14 <#2> phutil_escape_html(PHUITwoColumnView) called at [<phutil>/src/markup/render.php:189]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #15 <#2> phutil_implode_html(string, array) called at [<phabricator>/src/view/page/PhabricatorBarePageView.php:58]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #16 <#2> PhabricatorBarePageView::willRenderPage() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:195]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #17 <#2> PhabricatorStandardPageView::willRenderPage() called at [<phabricator>/src/view/page/AphrontPageView.php:46]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #18 <#2> AphrontPageView::render() called at [<phabricator>/src/view/page/PhabricatorStandardPageView.php:841]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #19 <#2> PhabricatorStandardPageView::produceAphrontResponse() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:615]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #20 <#2> AphrontApplicationConfiguration::produceResponse(AphrontRequest, PhabricatorStandardPageView) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:246]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #21 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:149]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #22 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #23 phlog(Exception) called at [<phabricator>/src/aphront/response/AphrontUnhandledExceptionResponse.php:20]
2016-04-16 19:52:16: (mod_fastcgi.c.2695) FastCGI-stderr:   #24 AphrontUnhandledExceptionResponse::setException(Exception) called at [<phabricator>/webroot/index.php:21]

This stuff pops up after requesting a broken repositories config page. Also, the fact that a repository first needs to have a commit inside is not of influence, as is the fact that the initial visibility should be "Administrators only". You don't even need to change the value. I'll edit the task to provide a simpler reproduction step.

Ok, Whoops. I toyed with it a bit earlier and created a space, then had the balls to archive it. I unarchived it and everything starts working again: Repositories get shown again in the Diffusion menu, old broken repos stay broken, but new repos can be edited just fine.

Should Spaces warn against disabling the default repo?

tl;dr Don't archive your default space.

Yeah we should fix that, for sure. Thanks for digging into this.

Turns out that because all spaces were archived, repositories did not get an space assigned to them, explaining the error. After I re-enabled S1, I saw a box for selecting the space appear.

avivey renamed this task from Config becomes inaccesible after changing visibility to Config becomes inaccesible after changing visibility when all spaces are archived.Apr 16 2016, 8:00 PM
avivey updated the task description. (Show Details)
avivey added a project: Spaces.