GNU social にアクセスするとなにも表示されなくなって困る

gnusocial 🏛️

さっきまでは動いていたのにウェブブラウザ(qutebrowser)のバージョンアップに追従するために再起動して,自分用 GNU social にアクセスすると画面が真っ白です><
スマートフォンのアプリ経由(Twidere)だと動作しているので表示周りの問題でしょうか?

config.php
$config['site']['logfile'] に指定しているログファイルを確認するとこんなメッセージがありました.

2019-03-22 14:35:28 LOG_DEBUG: [gnusocial.matoken.org:29424.bda9531d GET /] action.php - Server error '500' on 'qvitter': Class 'Locale' not found
2019-03-22 14:35:28 LOG_ERR: [gnusocial.matoken.org:29424.bda9531d GET /] Handled serverError (500) but cannot output into desired format (NULL): 'Class \'Locale\' not found'
2019-03-22 14:35:28 LOG_ERR: [gnusocial.matoken.org:29424.bda9531d GET /] ServerErrorAction: 500 Class 'Locale' not found

このあたりで使おうとしているよう

$ find plugins/Qvitter -type f -print0 | xargs -0 grep -n Locale
plugins/Qvitter/actions/qvitter.php:341:                    window.usersLanguageNameInEnglish = <?php print json_encode(Locale::getDisplayLanguage($user_browser_language, 'en')) ?>;
plugins/Qvitter/actions/qvitter.php:462:                                                $languagecodesandnames[$lancode]['english_name'] = Locale::getDisplayName($lancode, 'en');
plugins/Qvitter/actions/qvitter.php:463:                                                $languagecodesandnames[$lancode]['name'] = Locale::getDisplayName($lancode, $lancode);

これが見つからないか存在しない状態のようです.

それらしいpackage を探して,

$ apt-cache search ^php international
php-horde-idna - IDNA backend normalization package
php-horde-ingo - An email filter rules manager
php-intl - Internationalisation module for PHP [default]
php-net-idna2 - PHP Pear module for handling international domain names
php-symfony-translation - tools to internationalize an application
php7.2-intl - Internationalisation module for PHP
phpmyadmin - MySQL web administration tool
php7.0-intl - Internationalisation module for PHP
$ apt show php-intl
Package: php-intl
Version: 1:7.2+60ubuntu1
Priority: optional
Section: universe/php
Source: php-defaults (60ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 12.3 kB
Depends: php-common, php7.2-intl
Download-Size: 2,012 B
APT-Sources: http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Description: Internationalisation module for PHP [default]
 This package provides a Internationalisation module for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Ubuntu's default
 PHP version (currently 7.2).

導入することで解決しました.

sudo apt-get install php7.2-intl

恐らく php のバージョンを上げたときに漏れてしまい,API などは問題なく使えていたのでウェブブラウザを再起動するまで気づかなかった感じのようです.

しかし,GNU social はこういう警告をよく見かけるのでどうにかしないといけないですね.開発は滞っている感じなので Pleroma あたりに移行するのがいいんでしょうが…….

this will throw an Error in a future version of PHP

環境

$ dpkg-query -W php7.2-intl
php7.2-intl     7.2.15-0ubuntu0.18.04.1
$ w3m -dump https://gnusocial.matoken.org/nodeinfo/2.0|jq .software
{
  "name": "gnusocial",
  "version": "1.2.0-beta5"
}
$ lsb_release -d
Description:    Ubuntu 18.04.2 LTS
$ uname -m
x86_64

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)