Page MenuHomePhorge

Crash on "Readonly" Config page: call to undefined method PlatformSymbols::getPlatformServerSymbol()
Closed, ResolvedPublic

Description

Describe the root problem

I see a Crash on this specific page in my local Phorge/Phabricator (but it is true also here in we.phorge.it):

https://we.phorge.it/readonly/config/

This is what I see:

Unhandled Exception ("Error")

Call to undefined method PlatformSymbols::getPlatformServerSymbol()

Why? (1)

Because I clicked on this Read-only notification in my local Phorge:

Read-only Toast Phorge.png (48×281 px, 2 KB)

Why? (2)

Because I love to click new things.

Why? (3)

That was a new thing since I've put my Phorge in Read-only mode for a maintenance setting cluster.read-only = true and it seems it spawns that new toast notification, so I clicked it to discover its destination.

Why? (4)

Because I love Phorge and wanted to have my latest changes in the main branch and I followed the official documentation that mentions the read-only mode etc. and so I decided to set that flag for some minutes in my Phorge.

Why? (5 - last)

At this point I no longer know who I am. This is probably the root problem.

What I've found out

Steps to reproduce:

What happens:

Call to undefined method PlatformSymbols::getPlatformServerSymbol()

What should happen instead:

  • Something.

Considerations

  1. In Arcanist, it seems the class PlatformSymbols from Arcanist never had the method getPlatformServerSymbol(), since it was introduced:
git log -p -M --follow --stat -- ./src/platform/PlatformSymbols.php

rARCa33aeb3c36c2: Add a "product name literal in pht()" linter

  1. It seems the class Phobject (that is extended by PlatformSymbols) never had the method getPlatformServerSymbol(), since it was introduced:
git log -p -M --follow --stat -- ./src/object/Phobject.php

rARC9b74cb4ee641: Fully merge "libphutil/" into "arcanist/"

Cause

The regression was probably introduced here (Apr 25 2022):

rP4d3f0dc7c727: Remove product literal strings in "pht()", part 8

This change adopted the unexisting method PlatformSymbols::getPlatformServerSymbol() to just display "Phabricator" I think. So, the right method was PlatformSymbols::getPlatformServerName() instead, probably.

Event Timeline

valerio.bozzolan created this task.
valerio.bozzolan created this object in space S1 Public.
valerio.bozzolan renamed this task from Fix "Readonly" Config page: Call to undefined method PlatformSymbols::getPlatformServerSymbol() to Crash on "Readonly" Config page: call to undefined method PlatformSymbols::getPlatformServerSymbol().Mar 24 2023, 08:29
valerio.bozzolan claimed this task.
valerio.bozzolan updated the task description. (Show Details)
valerio.bozzolan updated the task description. (Show Details)