]> 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 09:23:43 +0000 (11:23 +0200)
plugins/LRDD/lib/discovery.php
plugins/OStatus/classes/Ostatus_profile.php

index 4049113408c2f2b7c139a35b129948dadd5b9f7f..c8cf3277e27bcaa9238021bfd9a7d3dfe67e61b5 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 5de311107c57b6f58051e681f1ee862340d0dffb..bddec92690b2758d3ca4d12d0a1ff5cc61e03132 100644 (file)
@@ -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