<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TheGarage Tech Blog &#187; support</title>
	<atom:link href="http://garagetechblog.com/tag/support/feed/" rel="self" type="application/rss+xml" />
	<link>http://garagetechblog.com</link>
	<description>Tech projects from the corner of a suburban garage</description>
	<lastBuildDate>Sat, 04 Sep 2010 13:07:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Viewer-facing ajax in WordPress plugin</title>
		<link>http://garagetechblog.com/2009/09/03/633/</link>
		<comments>http://garagetechblog.com/2009/09/03/633/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 11:13:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress/Mu]]></category>
		<category><![CDATA[etcetera]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://garagetechblog.com/?p=633</guid>
		<description><![CDATA[It&#8217;s rare that I can&#8217;t solve a programming problem no matter how complex and thus I rarely leave a question on a support forum. I can&#8217;t even remember the last time; probably over a decade ago. Here is one I left recently at the supposedly fantastic&#160;WordPress.org plugin support forum. I am writing a plugin to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s rare that I can&#8217;t solve a programming problem no matter how complex and thus I rarely leave a question on a support forum. I can&#8217;t even remember the last time; probably over a decade ago. Here is one I left recently at the supposedly fantastic&nbsp;<a href="http://Wordpress.org" title="http://Wordpress. " target="_blank">WordPress.org</a> plugin support forum.</p>
<blockquote><p>I am writing a plugin to manage map resources and I having a couple a issues that I have been unable to figure out. I have a test site set up here &#8211;&gt;&nbsp;<a href="http://gulfcoastgeocache.com/" title="http://gulfcoastgeocache.com/" target="_blank">http://gulfcoastgeocache.com/</a></p>
<p>I am using the Google Map API and lots of ajax both admin and viewer-facing to display custom maps. On the viewer facing side I am using SACK to call a small php script that in turn calls the actual function inside the plugin class.</p>
<pre>
$gcgc_path  = str_replace('\\','/',dirname(__FILE__));
require_once($gcgc_path.'/gcgcclass.php');
$gcgc_Manager-&gt;getVectorXML($_POST[id]);
</pre>
<p>The class function:</p>
<pre>function getVectorXML(){
    header("Content-type: text/xml");
    $parms = array('id' =&gt; $_POST['id'],
                   'id_type' =&gt; 'vector_id'
                    );                         

    $cachets = $this-&gt;getVectorMapData($parms);
    $xhtml = "";
    $xhtml .= "";
    if($cachets){
      $xhtml .= "";
    	foreach ($cachets as $c){
    		$xhtml .= "";
    		}
    }
    $xhtml .= "";
    die($xhtml);
  }</pre>
<p>Works fine if the user is logged in but is failing if user is not logged in. More accurately, the ajax round trip succeeds but my xml response is -1 if user is not logged in. No data is coming back.</p>
<p>The codex example for ajax does not illustrate a cookie being sent on the viewer-facing side but this is where I am thinking the problem lies, but really I am at a loss for an idea right now.</p>
<p>This is my first WP plugin so I may be having a noob moment. I&#8217;ve been revisiting this issue repeatedly over the past couple of months and, I hate to admit, I can&#8217;t figure it out. Any help would be greatly appreciated.</p></blockquote>
<p>I posted that five days ago and not a peep. I even bumped it a couple of days ago. Still nothing. I&#8217;m not sure if the question is too stupid to warrant a response or if maybe it is too hard. I think the only way to get a quick response, or any response at all, for that matter, is to leave your query in broken English and to ask a question that indicates you don&#8217;t have a clue about what you are doing. </p>
<p>I&#8217;m not impressed. If anyone has a clue about the ajax, please let me know. </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://garagetechblog.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://garagetechblog.com/2009/09/03/633/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
