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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 27 2017, 5:37 PM

@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.

The ticket for switching to the OOP architechture is: T165399: Update all of the Xtools with new backend

Matthewrbowker closed this task as Resolved.Jun 4 2017, 5:30 PM

Pull Request merged.

MusikAnimal moved this task from Inbox to Complete on the XTools board.Jul 23 2017, 7:45 PM