<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>corprewland &#187; bees</title>
	<link>http://www.corprew.org</link>
	<description>(dis)information organization</description>
	<pubDate>Sat, 04 Oct 2008 19:47:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>drupal and taxonomy</title>
		<link>http://www.corprew.org/blog/2008/04/17/drupal-and-taxonomy/</link>
		<comments>http://www.corprew.org/blog/2008/04/17/drupal-and-taxonomy/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 07:38:39 +0000</pubDate>
		<dc:creator>corprew</dc:creator>
		
		<category><![CDATA[computer programming]]></category>

		<category><![CDATA[acls]]></category>

		<category><![CDATA[bees]]></category>

		<category><![CDATA[cmses]]></category>

		<category><![CDATA[database hacking]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[drupal5]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[node-based-cms]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[organic systems]]></category>

		<category><![CDATA[simple solutions to complex problems]]></category>

		<category><![CDATA[taxonomy]]></category>

		<category><![CDATA[taxos]]></category>

		<guid isPermaLink="false">http://www.corprew.org/blog/2008/04/17/drupal-and-taxonomy/</guid>
		<description><![CDATA[Drupal 5 has a few problems in its security layer, as I&#8217;ve mentioned other places, and some of them stem from the sort of &#8216;it-works-for-me&#8217; philosophy of open source.   This is particularly a problem in a complex system like Drupal, which in most installations is made up of a few dozen modules in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.drupal.org/">Drupal 5</a> has a few problems in its security layer, as I&#8217;ve mentioned other places, and some of them stem from the sort of &#8216;it-works-for-me&#8217; philosophy of open source.   This is particularly a problem in a complex system like Drupal, which in most installations is made up of a few dozen modules in addition to the core.</p>
<p>The current issue I&#8217;m having is that nodes created by the aggregation module get their taxonomy stripped when they&#8217;re updated because of how another module uses the security functionality, which is just <em>hilarious</em> in a site that&#8217;s largely organized organically by taxonomy. So, after talking with the people I&#8217;m working for on the site, I ended up creating a simple PHP script to run through cron that fixes the issues &#8216;the hard way.&#8217;</p>
<p>If you check out this query&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> fix_object<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$name</span>, <span style="color: #0000ff;">$sqlcon</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0000ff;">$query</span> = <span style="color: #ff0000;">&quot;SELECT term_data.name name, term_data.tid termid, node.nid nodeid, node.title title FROM node LEFT JOIN term_node  ON ( term_node.nid = node.nid ) LEFT JOIN term_data ON ( term_data.tid = term_node.tid ) WHERE node.type = 'aggregation_item ' AND node.title LIKE 'Xxxxx &quot;</span> . <span style="color: #0000ff;">$name</span> . <span style="color: #ff0000;">&quot;%'&quot;</span>;
&nbsp;
  <span style="color: #808080; font-style: italic;">// Perform Query</span>
  <span style="color: #0000ff;">$result</span> = <span style="color: #000066;">mysql_query</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #808080; font-style: italic;">// ... and so on...</span></pre></div></div>

<p>You can see that this is a fairly normal sql query that looks for all the nodes of type aggregation_item and titled a particular pattern.  Because of the way the joins are structured, that means that any nodes that have lost their taxonomies will have NULL for termname and termid.  Those nodeids with NULL termids can then have the proper taxonomy entries stuffed back into them&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">function</span> insert_taxo_4_node<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$node_id</span>, <span style="color: #0000ff;">$taxo_id</span>, <span style="color: #0000ff;">$con</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0000ff;">$query</span> = <span style="color: #ff0000;">&quot;INSERT INTO term_node (nid, tid) VALUES (&quot;</span>. <span style="color: #0000ff;">$node_id</span> . <span style="color: #ff0000;">&quot;,&quot;</span> . <span style="color: #0000ff;">$taxo_id</span> . <span style="color: #ff0000;">&quot;)&quot;</span>;
&nbsp;
  <span style="color: #0000ff;">$result</span> = <span style="color: #000066;">mysql_query</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$query</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #808080; font-style: italic;">// Check result</span>
  <span style="color: #808080; font-style: italic;">// This shows the actual query sent to MySQL, and the error. Useful for debugging.</span>
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#41;</span> 
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #0000ff;">$message</span>  = <span style="color: #ff0000;">'Invalid query: '</span> . <span style="color: #000066;">mysql_error</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
      <span style="color: #0000ff;">$message</span> .= <span style="color: #ff0000;">'Whole query: '</span> . <span style="color: #0000ff;">$query</span>;
      <span style="color: #000066;">die</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I&#8217;m largely posting this up in case people run into the same problem &#8212; this is a hilariously simple fix for a difficult to fix problem in drupal, but it&#8217;s a generic information architecture issue of what to do when the system that you&#8217;re working on is unreliable.  I should probably mention that the issues with security in drupal aren&#8217;t related to authentication, but instead are related to item ACLs denying access to things for strange reasons, and are not crucial security bugs in the OMG MUST PATCH NOW sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corprew.org/blog/2008/04/17/drupal-and-taxonomy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Management, BM style</title>
		<link>http://www.corprew.org/blog/2008/04/17/management-bm-style/</link>
		<comments>http://www.corprew.org/blog/2008/04/17/management-bm-style/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 07:06:49 +0000</pubDate>
		<dc:creator>corprew</dc:creator>
		
		<category><![CDATA[communities]]></category>

		<category><![CDATA[bees]]></category>

		<category><![CDATA[burning man]]></category>

		<category><![CDATA[chaos]]></category>

		<category><![CDATA[emergent behavior]]></category>

		<category><![CDATA[management]]></category>

		<category><![CDATA[management philosophy]]></category>

		<category><![CDATA[rangering]]></category>

		<guid isPermaLink="false">http://www.corprew.org/blog/2008/04/17/management-bm-style/</guid>
		<description><![CDATA[Although, as the trainers noted, it sounds like the set up to a joke, Burning Man takes providing management training to its senior volunteers and staff members very seriously.  As part of my Quinfecta of Frenetic Activity down in SFO, I went to the 2008 version of said training.
Because of BM&#8217;s nature as a [...]]]></description>
			<content:encoded><![CDATA[<p>Although, as the trainers noted, it sounds like the set up to a joke, Burning Man takes providing management training to its senior volunteers and staff members very seriously.  As part of my Quinfecta of Frenetic Activity down in SFO, I went to the 2008 version of said training.</p>
<p>Because of BM&#8217;s nature as a largely community-driven and volunteer-based organization, their management priorities are a little different than other organizations.  It&#8217;s very simple, really, and I can sum up the difference in three words:</p>
<p><strong>RESPECT EMERGENT BEHAVIOR</strong></p>
<p>This shows up in a number of ways, in respecting the ideas that volunteers come up with, in coping with what emerges from chaos every year, and in generally planning from middle-up or bottom-up instead of top-down when possible.  The respect emergent behavior is a spin of mine on it, but it&#8217;s something that I&#8217;ve had as a part of my core management philosophy for a while, so I was suprised and pleased to hear burning man talking about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corprew.org/blog/2008/04/17/management-bm-style/feed/</wfw:commentRss>
		</item>
		<item>
		<title>oh, yeah, and&#8230;</title>
		<link>http://www.corprew.org/blog/2008/04/04/oh-yeah-and/</link>
		<comments>http://www.corprew.org/blog/2008/04/04/oh-yeah-and/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 20:27:21 +0000</pubDate>
		<dc:creator>corprew</dc:creator>
		
		<category><![CDATA[briefnotes]]></category>

		<category><![CDATA[bees]]></category>

		<category><![CDATA[bloom]]></category>

		<category><![CDATA[category]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[embodied philosophy]]></category>

		<category><![CDATA[iphone dev]]></category>

		<category><![CDATA[macosx dev]]></category>

		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://www.corprew.org/blog/2008/04/04/oh-yeah-and/</guid>
		<description><![CDATA[I&#8217;ve currently got about a half dozen small projects going of various sorts (but am always looking for more and/or an actual full time job given that ), but one group that&#8217;s been a real pleasure to work with for the last month or so has been the North Atlantic Bloom Project, I&#8217;m making them [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve currently got about a half dozen small projects going of various sorts (but am always looking for more and/or an actual full time job given that ), but one group that&#8217;s been a real pleasure to work with for the last month or so has been the <a href="http://bloom.apl.washington.edu">North Atlantic Bloom Project</a>, I&#8217;m making them a website that includes various features like maps, instrument data that populates into websites for site navigation and the like, and is based on drupal.</p>
<p>My current interests (this week) are macintosh development, semantics (RDF), embodied philosophy and category (Lakoff), drupal, iPhone development, good coding practices, and project lifecycle management (from soup to nuts.)  My interests next week will be getting a website off the ground that I unexpectedly ended up owning after a contract fell through.  That was suprising and not entirely pleasant, but will see what can be done to have matters turn out positively.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corprew.org/blog/2008/04/04/oh-yeah-and/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.372 seconds -->
