]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
A bit more instructive debugging
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 22 Apr 2017 08:55:24 +0000 (10:55 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 22 Apr 2017 08:55:24 +0000 (10:55 +0200)
plugins/LRDD/lib/discovery.php
plugins/OStatus/classes/Ostatus_profile.php

index 03f24e04fa6c88a997ad92bda95c80172b8dfde0..77271e06f697545ea1d64e58db8486f6ad114b24 100644 (file)
@@ -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();
index eb385e09f109fe8d9a8ce0953bc4eddb8c4c846f..b4b38e5aadb4db0d9bdd8a607ec7603233e60483 100644 (file)
@@ -1584,12 +1584,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