majick777
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Pingback serverJust another note, it was definitely some code in my header causing the main problems, some javascript and some style code added by some plugins. Moving it to the footer seemed to make a difference to running the above test code. 🙂
Forum: Requests and Feedback
In reply to: Pingback bug located in xml-rpc-servercheers, this wordpress site is so huge it’s hard to find where to put things sometimes!
Forum: Everything else WordPress
In reply to: Pingback serverIt’s pretty hard to tell why some are actually getting picked and which ones stripped without testing a particular page. I don’t think newlines are going to help, it’s just going to strip them anyway.. From what I could tell it is influenced by different templates and plugins adding code, the main site I was testing on it seemed to be all the plugins adding javascript code to the header that confused the hell out of strip_tags. You could always run something like this as a test with a php file (run it from anywhere really), but I’d still recommend the plugin just in case…
<?php $linea = file_get_contents('http://yourblog.com/yourpage/'); $linea = str_replace('<!DOC','<DOC',$linea);$linea = preg_replace('/[\s\r\n\t]+/', ' ', $linea); $linea = preg_replace( "/ <(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/","\n\n",$linea); $linea = strip_tags($linea,'<a>'); echo $linea; ?>…which basically just replicates the output that the xmlrpc server class checks for valid href tags. if you see valid links outputted, they are the ones that are showing up. in my case, I am getting a whole bunch of chopped up javascript at the top, then my menu links but no post content links, and then with the new plugin the content links show up at the bottom now.
🙂 so I’m happy with that.
Forum: Everything else WordPress
In reply to: Pingback serverI’ve been working on a plugin that works with pingbacks, and you were close, I tested the line you mentioned, but the problem seems to be with the line in class-wp-xmlrpc-server.php which uses strip_tags.
(line 3422 in WP 3.1):
$linea = strip_tags( $linea, '<a>' ); // just keep the tag we needFor some reason this function is not working properly at all on some templates (or that is the way it seems) and instead of returning all the
<a>tags is cutting a lot of them out, making it seem to the server like there is no target link in the source URI.Unfortunately, even if this were fixed in WordPress in the future, pinging servers with old versions without the fix is still going to give you the same old error. but the good new is..
I have included a workaround in my new plugin:
http://wordpress.org/extend/plugins/pingchecker/
Basically it does a regex match for links in your content, then echoes them in a hidden div in the footer, making it much easier for the strip_tags function to actually find them.…am off to post this as a bug in the appropriate forum, hopefully then it will be fixed for future versions of WordPress at the source.
🙂