From 45dfa9f2151eaaafae0b9d6a949b50f64f15f55c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 22 Apr 2017 10:55:24 +0200 Subject: [PATCH] A bit more instructive debugging --- plugins/LRDD/lib/discovery.php | 2 ++ plugins/OStatus/classes/Ostatus_profile.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/LRDD/lib/discovery.php b/plugins/LRDD/lib/discovery.php index 4049113408..c8cf3277e2 100644 --- a/plugins/LRDD/lib/discovery.php +++ b/plugins/LRDD/lib/discovery.php @@ -93,6 +93,8 @@ class Discovery // Normalize the incoming $id to make sure we have a uri $uri = self::normalize($id); + common_debug(sprintf('Performing discovery for "%s" (normalized "%s")', $id, $uri)); + foreach ($this->methods as $class) { try { $xrd = new XML_XRD(); diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 5de311107c..bddec92690 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1571,12 +1571,14 @@ class Ostatus_profile extends Managed_DataObject if (is_null($uri)) { // Negative cache entry // TRANS: Exception. - throw new Exception(_m('Not a valid webfinger address.')); + throw new Exception(_m('Not a valid webfinger address (via cache).')); } $oprofile = Ostatus_profile::getKV('uri', $uri); if ($oprofile instanceof Ostatus_profile) { return $oprofile; } + common_log(LOG_ERR, sprintf(__METHOD__ . ': Webfinger address cache inconsistent with database, did not find Ostatus_profile uri==%s', $uri)); + self::cacheSet(sprintf('ostatus_profile:webfinger:%s', $addr), false); } // Try looking it up -- 2.39.5