Page MenuHomePhabricator

if app.default_project is an invalid project, several tools get stuck in a redirect loop
Closed, ResolvedPublic

Description

I have observed this behavior on the "topedits" and "pages" tools. If the namespace response is invalid, these tools attempt to load the default project then redirect. However, if the default project is not valid, this cycle repeats until Firefox gives up.

Instead of redrecting, it might be wise to just let the field not populate....

Event Timeline

@Samwilson @MusikAnimal So I've come across two different ways to query the meta database for a project:

  • One is via labsHelper: databasePrepare()
  • The other is projectRepository::getProject();

What are the differences between the two? I'd rather stick to just one, so which should we use?

My preference is for the OOPiness of ProjectRepository::getProject(), because then you've got a Project object to do things with (such as ask it whether it exists, and what it canonical name is, etc. — although not all that functionality is done yet).

I'm very sorry I've not been keeping up to date with writing documentation! I'll try to add to development.rst. Basically, the OOP bits are what came from our sketching out of class structures.

Pull Request merged.