<?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>Eric Martin &#187; Bugs</title>
	<atom:link href="http://www.ericmmartin.com/tag/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericmmartin.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Apr 2010 15:28:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery &amp; Browser Issues (revisited)</title>
		<link>http://www.ericmmartin.com/jquery-browser-issues-revisited/</link>
		<comments>http://www.ericmmartin.com/jquery-browser-issues-revisited/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 23:32:25 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=353</guid>
		<description><![CDATA[Back in August, I blogged about "three fairly significant browser issues" I had encountered while using jQuery. With the release of jQuery 1.3, and subsequent minor versions, I thought I'd take a look back at those browser issues and see if any of them had been resolved. IE7 Recap: In certain situations, jQuery’s $.browser.version will [...]]]></description>
			<content:encoded><![CDATA[<p>Back in August, I <a href="http://www.ericmmartin.com/jquery-browser-issues/">blogged</a> about "three fairly significant browser issues" I had encountered while using jQuery. With the release of jQuery 1.3, and subsequent minor versions, I thought I'd take a look back at those browser issues and see if any of them had been resolved.</p>
<p><span id="more-353"></span></p>
<h3>IE7</h3>
<p><strong>Recap:</strong> In certain situations, jQuery’s <code>$.browser.version</code> will report IE 7 as version 6.</p>
<p>Considering the problem is due to IE 7 having an incorrect user-agent, I'm not sure that this problem was up to jQuery to solve. It would have required the user-agent parsing code to check non-user-agent properties...which is probably a bad idea.</p>
<p>I found out that my original code suggestions might fail in situations where IE 6 is using a 3rd party library to add <code>XMLHttpRequest</code> support, so here are my updated IE 6 and IE 7 detection suggestions:</p>
<p>Override the <code>$.browser.version</code> value:</p>
<pre><code>jQuery.browser.version = jQuery.browser.msie &#038;&
    parseInt(jQuery.browser.version) >= 6 &#038;&
    typeof window['XMLHttpRequest'] == "object" ?
        "7.0" :
        jQuery.browser.version;</code></pre>
<p>Add a new <code>msie6</code> property:</p>
<pre><code>jQuery.browser.msie6 = jQuery.browser.msie &#038;&
    parseInt(jQuery.browser.version) == 6 &#038;&
    typeof window['XMLHttpRequest'] != "object";</code></pre>
<p>Keep in mind that <code>$.browser</code> is now deprecated, which means it will go away at some point in a future release. I'm not going to get into the object detection vs browser sniffing debate, but just be aware!</p>
<h3>Opera 9.5</h3>
<p><strong>Recap:</strong> Opera, in an effort to follow standards, changed where it was storing the value for the viewport height.</p>
<p>This issue was fixed in <a href="http://dev.jquery.com/ticket/3117">jQuery Ticket 3117</a> by <a href="http://flesler.blogspot.com/">Ariel Flesler</a>. If you have Opera 9.5, you can test the results on <a href="http://www.ericmmartin.com/code/jquery/3117/">this page</a>.</p>
<h3>Safari 3 (Windows)</h3>
<p><strong>Recap:</strong> The following element would not be hidden in Safari: <code>$("&lt;div/&gt;").hide().appendTo('body');</code></p>
<p>I found out that this issue also occurs in Safari 4! The original jQuery ticket I mentioned was marked as a duplicate, but the issue was fixed in <a href="http://dev.jquery.com/ticket/1239">ticket 1239</a>.</p>
<h3>Summary</h3>
<p>Besides the problems with the IE user-agent, the jQuery developers implemented fixes for the two other browser issues that I had previously blogged about. jQuery 1.3.x has a number of new features and code improvements and continues to be, IMO, the best available JavaScript library. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/jquery-browser-issues-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress bug &#8211; duplicate page entries</title>
		<link>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/</link>
		<comments>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 18:16:14 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=288</guid>
		<description><![CDATA[This bug was fixed in WordPress 2.8 [changeset] While working on a new site design, I found an interesting bug in WordPress 2.7. I created two new pages to use as "Front page displays", one called Blog and one called Home. To create the pages, I clicked on Pages > Add New, entered a Title [...]]]></description>
			<content:encoded><![CDATA[<div class="note">This bug was fixed in WordPress 2.8 [<a href="http://core.trac.wordpress.org/changeset/10251">changeset</a>]</div>
<p>While working on a new site design, I found an interesting bug in WordPress 2.7. I created two new pages to use as "Front page displays", one called Blog and one called Home. To create the pages, I clicked on Pages > Add New, entered a Title and clicked Publish.</p>
<p>I then went to my Reading Settings (Settings > Reading) and set the static Front and Posts page to the pages I just created. Going back to my site, I tested out the new static pages only to find they didn't work.</p>
<p><span id="more-288"></span></p>
<p>After a lot of time and troubleshooting, I noticed on the Pages screen that there were two copies of each page I had created - with one still labeled as a Draft. After even more time troubleshooting, I finally discovered the issue. Unlike the Posts page, the Publish and Save Draft buttons are not disabled during an autosave. So, when I entered the Page title and clicked Publish, the autosave and publish requests were happening at the same time.</p>
<p>I opened a WordPress <a href="http://trac.wordpress.org/ticket/8710">ticket</a> and submitted a <a href="http://trac.wordpress.org/attachment/ticket/8710/autosave.patch">patch</a>. The patch was applied by azaozz, but it looks like it won't be available until WordPress 2.8. To fix this bug yourself, open <code>/wp-includes/js/autosave.js</code> and change all occurrences of <code>#submitpost</code> to <code>.submitbox</code>:</p>
<pre><code>function autosave_enable_buttons() {
	jQuery(".submitbox :button:disabled, .submitbox :submit:disabled").attr('disabled', '');
}

function autosave_disable_buttons() {
	jQuery(".submitbox :button:enabled, .submitbox :submit:enabled").attr('disabled', 'disabled');
	setTimeout(autosave_enable_buttons, 5000); // Re-enable 5 sec later.  Just gives autosave a head start to avoid collisions.
}
</code></pre>
<p>Now the buttons will be disabled during an autosave, just like it does on the Posts page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/wordpress-bug-duplicate-page-entries/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery &amp; Browser Issues</title>
		<link>http://www.ericmmartin.com/jquery-browser-issues/</link>
		<comments>http://www.ericmmartin.com/jquery-browser-issues/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 04:29:50 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=89</guid>
		<description><![CDATA[Update: This post has been replaced with an updated version. During the time that I've been using jQuery (about a year now), I've run into three fairly significant browser issues. Between IE, Firefox, Safari, and Opera, Firefox is the only browser that I have yet to experience any issues with (related to jQuery, of course). [...]]]></description>
			<content:encoded><![CDATA[<div class="note">Update: This post has been replaced with an <a href="http://www.ericmmartin.com/jquery-browser-issues-revisited/">updated version</a>.</div>
<p>During the time that I've been using jQuery (about a year now), I've run into three fairly significant browser issues. Between IE, Firefox, Safari, and Opera, Firefox is the only browser that I have yet to experience any issues with (related to jQuery, of course).</p>
<p><span id="more-89"></span></p>
<h3>IE 7</h3>
<p>In certain situations, jQuery's $.browser.version will report IE 7 as version 6. Jamie Thompson noted <a href="http://jamazon.co.uk/web/2008/07/23/an-ie7-bug-that-returns-msie-60-user-agent-string/">one possible situation</a> on his blog, but typically the issue is caused due to the fact that some copies of IE 7 included <code>MSIE 6.0</code> within its <a href="http://jamazon.co.uk/web/2008/03/14/jquerybrowserversion-doesnt-recognise-ie7/">user-agent string</a>.</p>
<p>There is a <a href="http://dev.jquery.com/ticket/3169">jQuery Ticket</a> open for the issue, but a solution has not been chosen. Based on some ideas that Jamie had, I came up with a possible solution by overriding the $.browser.version value:</p>
<pre><code>jQuery.browser.version = jQuery.browser.msie &#038;&
    parseInt(jQuery.browser.version) >= 6 &#038;&
    window["XMLHttpRequest"] ?
        "7.0" :
        jQuery.browser.version;</code></pre>
<p>Additionally, there are situations when I'm just looking for IE 6:</p>
<pre><code>jQuery.browser.msie6 = jQuery.browser.msie &#038;&
    parseInt(jQuery.browser.version) == 6 &#038;&
    !window["XMLHttpRequest"];</code></pre>
<p>It appears that these issues were resolved in IE 8 (at least in the beta version), but until jQuery releases a "fix", you'll have to deal with unreliable browser version detection in IE 7, or use one of the suggestions above.</p>
<h3>Opera 9.5</h3>
<p>I discovered an issue getting the viewport height in Opera 9.5 while testing my rewrite of <a href="http://www.ericmmartin.com/projects/simplemodal">SimpleModal</a>. It turns out that Opera, in an effort to follow standards, changed where it was storing the value for the viewport height...breaking the way jQuery was getting the value. Previously, the value was stored in <code>document.body["clientHeight"]</code>, but in 9.5 it was moved to <code>document.documentElement["clientHeight"]</code>. There is also a <a href="http://dev.jquery.com/ticket/3117">jQuery Ticket</a> open for this issue, and a patch has been added by <a href="http://flesler.blogspot.com/">Ariel Flesler</a>.</p>
<p>For SimpleModal, I've added code that will fix the issue until it is fixed in jQuery:</p>
<pre><code>// fix a jQuery/Opera bug with determining the window height
var h = $.browser.opera &#038;& $.browser.version &gt; "9.5" &#038;&
    $.fn.jquery &lt;= "1.2.6" ?
        document.documentElement["clientHeight"] :
        $(window).height();</code></pre>
<h3>Safari 3 (Windows)</h3>
<p>This is the smallest of the three issues, but annoying none-the-less. Take the following example:</p>
<pre><code>$("&lt;div/&gt;").css({
    background: "#336699",
    color: "#fff",
    padding: "8px",
    width: "200px"
}).html("Loading...").hide().appendTo("body");
</code></pre>
<p>In Safari, the "loading" element will be visible when the page loads. In all other browsers, it is hidden (<code>display:none</code>). The issue occurs because the jQuery <code>hide()</code> function is supposed to look for "visible" elements and set the CSS display property to 'none'. However, in Safari, it appears that an element not yet in the DOM, already has a display property of 'none'...which sounds fine, right? It's not! Since it fails the visibility test, jQuery does not explicitly set the display property to "none".</p>
<p>Then, once the element is added to the DOM, it appears that Safari sets the elements display property to 'block'. So even though the intention was to have it "hidden", due to a Safari quirk (and lack of a jQuery internal solution), the element will be visible.</p>
<p>As I'm sure you've guessed by now, there is a <a href="http://dev.jquery.com/ticket/2233">jQuery Ticket</a> open, but the suggestion is to just change the way you use jQuery. One suggestion is to move the <code>.hide()</code> after the <code>.appendTo("body")</code>. My problem with this is that it introduces the possibility of a flicker on the screen as the element is added and then hidden. The workaround I am using is to manually set the display property on the element:</p>
<pre><code>$("&lt;div/&gt;").css({
    background: "#336699",
    color: "#fff",
    display: "none",
    padding: "8px",
    width: "200px"
}).html("Loading...").appendTo("body");
</code></pre>
<p>That concludes my notes about three browser issues I've encountered while using jQuery. If you've run into any issues where you've had to use a workaround, or have any other suggestions for the workarounds I used, feel free to mention them below!</p>
<p>And the moral of the story...use <a href="http://www.spreadfirefox.com/node&#038;id=167004&#038;t=1">Firefox</a>! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/jquery-browser-issues/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CakePHP 1.2 RC2 &#8211; Apache Crash on Vista</title>
		<link>http://www.ericmmartin.com/cakephp-12-rc2-apache-crash-on-vista/</link>
		<comments>http://www.ericmmartin.com/cakephp-12-rc2-apache-crash-on-vista/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 04:45:54 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=44</guid>
		<description><![CDATA[In my spare time (yeah, right), I've been busy developing a web application using CakePHP. I ran into a problem tonight that I wanted to share, in case anyone else happens to run into something similar. After making some changes to my app, I went to test it out, only to get an Vista notification [...]]]></description>
			<content:encoded><![CDATA[<p>In my spare time (yeah, right), I've been busy developing a web application using <a href="http://www.cakephp.org">CakePHP</a>. I ran into a problem tonight that I wanted to share, in case anyone else happens to run into something similar.</p>
<p>After making some changes to my app, I went to test it out, only to get an Vista notification stating that httpd.exe had shut down unexpectedly. I checked my Event Viewer Application logs and found an Error with the following details:</p>
<pre><code>Faulting application httpd.exe, version 2.2.6.0, time stamp 0x46deb625,
faulting module ntdll.dll, version 6.0.6001.18000, time stamp 0x4791a7a6,
exception code 0xc00000fd, fault offset 0x00065950, process id 0x998,
application start time 0x01c8db31c2d05070.</code></pre>
<p>After a bit of debugging and scratching my head, I remembered that I had deleted a "view helper" file that I had created, but forgot to remove the reference to it (<code>var $helpers = array()</code>) from my app_controller.php file...doh!</p>
<p>I am a bit surprised that CakePHP wasn't able to catch this problem since it seems to catch so many other "missing" situations. Perhaps there is a way that CakePHP can prevent the issue...</p>
<div class="note">Update: this issue was already a <a href="https://trac.cakephp.org/ticket/5010">reported bug</a> and looks like it is due to an infinate recursion when trying to load a helper that does not exist.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/cakephp-12-rc2-apache-crash-on-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts 2 ParametersInterceptor</title>
		<link>http://www.ericmmartin.com/struts-2-parametersinterceptor/</link>
		<comments>http://www.ericmmartin.com/struts-2-parametersinterceptor/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 15:47:28 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/?p=39</guid>
		<description><![CDATA[Are your logs being filled up with errors like: ERROR - ParametersInterceptor.setParameters(204) &#124; ParametersInterceptor - [setParameters]: Unexpected Exception caught setting '_' on 'class com.company.web.MyAction: Error setting expression '_' with value '[Ljava.lang.String;@1491ddc' If so, it's because Struts 2 is parsing the query string/post data and trying to "set" a value for each parameter it finds. I'm [...]]]></description>
			<content:encoded><![CDATA[<p>Are your logs being filled up with errors like: </p>
<pre><code>ERROR - ParametersInterceptor.setParameters(204) | ParametersInterceptor - [setParameters]: Unexpected Exception caught setting '_' on 'class com.company.web.MyAction: Error setting expression '_' with value '[Ljava.lang.String;@1491ddc'</code></pre>
<p>If so, it's because <a href="http://struts.apache.org/">Struts 2</a> is parsing the query string/post data and trying to "set" a value for each parameter it finds. </p>
<p>I'm working on an Struts 2 application utilizing the <a href="http://jquery.com/">jQuery JavaScript library</a> for the UI and the <a href="http://displaytag.sourceforge.net/">Displaytag tag library</a> for displaying tables.</p>
<p>With jQuery, I'm using the "no-cache" option (<code>cache: false</code>) on all Ajax calls, which adds "<code>_=timestamp</code>" to each request. Since I don't have a property called "<code>_</code>" in my Action class, I get an error (mentioned above) in my logs for each request.</p>
<p>Same with Displaytag, except the parameters causing errors are in the form of "<code>d-#-X</code>", where "<code>#</code>" is a unique id (usually 4 or 5 digits) and "<code>X</code>" is either <code>p</code>, <code>s</code> or <code>o</code>. They are used to determine the page (<code>p</code>) and/or the table sort order (<code>o</code> for asc/desc and <code>s </code>for which column).</p>
<p>The solution: configure Struts (struts.xml) to ignore these parameters:</p>
<pre><code>&lt;interceptors&gt;
   &lt;interceptor-stack name="defaultStack"&gt;
      &lt;interceptor-ref name="params"&gt;
         &lt;!--
            Excludes the jQuery no-cache _ parameter and
            the Displaytag d-#-X parameter(s)
         --&gt;
         &lt;param name="excludeParams"&gt;
            _,d-\d+?-[sop]
         &lt;/param&gt;
      &lt;/interceptor-ref&gt;
   &lt;/interceptor-stack&gt;
&lt;/interceptors&gt;</code></pre>
<p>If you have a different parameters that are causing problems, just put them in the <code>excludeParams</code> node, comma separating multiple parameters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/struts-2-parametersinterceptor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery bug &#8211; Ajax &#8216;no-cache&#8217; parameter</title>
		<link>http://www.ericmmartin.com/jquery-bug-ajax-no-cache-parameter/</link>
		<comments>http://www.ericmmartin.com/jquery-bug-ajax-no-cache-parameter/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 05:29:12 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/jquery-bug-ajax-no-cache-parameter/</guid>
		<description><![CDATA[In jQuery 1.2.1, when using the $.ajax function with cache: false, jQuery appends a parameter with the current timestamp to the URL. This parameter makes the URL unique and therefore prevents subsequent request from being retrieved from the browser cache. However, the code that adds this 'no-cache' parameter does not check to see if it [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://jquery.com/">jQuery 1.2.1</a>, when using the <code>$.ajax</code> function with <code>cache: false</code>,  jQuery appends a parameter with the current timestamp to the URL. This parameter makes the URL unique and therefore prevents subsequent request from being retrieved from the browser cache.</p>
<p>However, the code that adds this 'no-cache' parameter does not check to see if it already exists and so under certain circumstances you can end up with URL's that look like:</p>
<p><code>http://mysite.com/file.html?_=1196716041523&#038;_=1196716462963&#038;_=1196716464245</code></p>
<p>It certainly makes the URL unique :)</p>
<p>I opened a <a href="http://dev.jquery.com/ticket/1999">ticket</a> and submitted a <a href="http://dev.jquery.com/attachment/ticket/1999/ajax_cache.patch">patch</a>, which was quickly <a href="http://dev.jquery.com/changeset/4006">optimized</a> by a jQuery developer, davidserduke.</p>
<p>It's nice to see a project with responsive, helpful developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/jquery-bug-ajax-no-cache-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts 2 bug &#8211; s:submit tag type=button rendering</title>
		<link>http://www.ericmmartin.com/struts-2-bug-submit-button-tag-rendering/</link>
		<comments>http://www.ericmmartin.com/struts-2-bug-submit-button-tag-rendering/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 04:29:30 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/struts-2-bug-ssubmit-tag-typebutton-does-not-render-properly/</guid>
		<description><![CDATA[In Struts 2.0.11, the s:submit tag with type=button does not render properly. While working on a project using Struts 2, I was attempting to create a HTML button that looked something like: &#60;button type=&#34;button&#34; class=&#34;button positive save&#34;&#62; &#60;img src=&#34;/images/tick.png&#34; alt=&#34;Save&#34;&#62; Save &#60;/button&#62; I followed the Struts 2 Tag Reference for the submit tag and tried [...]]]></description>
			<content:encoded><![CDATA[<p>In Struts 2.0.11, the <code>s:submit</code> tag with <code>type=button</code> does not render properly.</p>
<p>While working on a project using Struts 2, I was attempting to create a HTML button that looked something like:</p>
<pre><code>&lt;button type=&quot;button&quot; class=&quot;button positive save&quot;&gt;
    &lt;img src=&quot;/images/tick.png&quot; alt=&quot;Save&quot;&gt; Save
&lt;/button&gt;</code></pre>
<p>I followed the Struts 2 Tag Reference for the <a href="http://struts.apache.org/2.x/docs/submit.html">submit tag</a> and tried the following:</p>
<pre><code>&lt;s:submit type=&quot;button&quot; cssClass=&quot;button positive save&quot;&gt;
    &lt;img src=&quot;/images/tick.png&quot; alt=&quot;Save&quot;&gt; Save
&lt;/s:submit&gt;</code></pre>
<p>Instead of rendering like my example above, it looks like:</p>
<pre><code>&lt;img src=&quot;/images/tick.png&quot; alt=&quot;Save&quot;&gt; Save
&lt;button type=&quot;submit&quot; id=&quot;test_0&quot; value=&quot;Submit&quot; class=&quot;button positive save&quot;&gt;Submit&lt;/button&gt;</code></pre>
<p>Not exactly what I had in mind... ;)</p>
<p><span id="more-23"></span><br />
At first I thought that I was just doing something wrong, so I <a href="http://www.nabble.com/-S2--Complex-submit-button-issue-tf4889527.html">posed a question</a> on the mailing list. Then after searching the list some more, I found that this was, in fact, a bug and that it had been previously <a href="https://issues.apache.org/struts/browse/WW-1677">reported</a> and supposedly fixed.</p>
<p>I checked out the Struts 2 core project and started looking around in the code. I <a href="http://www.nabble.com/Re%3A-WW-1677-not-working-%28was-Re%3A-WW-167-%29-t4895694.html">posted</a> some of my thoughts and ended up creating a patch that added a new <code>s:button</code> tag.</p>
<p>Struts tries to render the <code>button</code> tag using the same code that is used to render the <code>input</code> tag. The two tags share a lot in common, however, there are some important differences between them. Mainly, the <code>input</code> tag does not have a body and uses its value attribute for its label, whereas the <code>button</code> tag must have a body, which is what is used as its label. Unless you required name/value information to be sent for the button, there is no need to include either of those attributes on the button tag.</p>
<p>It will be interesting to see if my patch is used...either way, it was fun to dig into the Struts code and it was a good learning experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/struts-2-bug-submit-button-tag-rendering/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shared object error during cPanel Apache build</title>
		<link>http://www.ericmmartin.com/shared-object-error-during-cpanel-apache-build/</link>
		<comments>http://www.ericmmartin.com/shared-object-error-during-cpanel-apache-build/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 05:15:01 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.ericmmartin.com/shared-object-error-during-cpanel-apache-build/</guid>
		<description><![CDATA[I was trying to add PHP Zip support on my cPanel server today and when Apache went to restart, it failed with the folowing error: Cannot load /usr/local/apache/libexec/mod_bwlimited.so into server: /usr/local/apache/libexec/mod_bwlimited.so: cannot open shared object file: No such file or directory After a Google search, I found that I needed to run: cd /usr/local/cpanel/apache /usr/local/apache/bin/apxs [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to add PHP Zip support on my cPanel server today and when Apache went to restart, it failed with the folowing error:</p>
<pre><code>Cannot load /usr/local/apache/libexec/mod_bwlimited.so into server: /usr/local/apache/libexec/mod_bwlimited.so: cannot open shared object file: No such file or directory
</code></pre>
<p>After a <a href='http://www.google.com/search?q=cpanel+Cannot+load+%2Fusr%2Flocal%2Fapache%2Flibexec%2Fmod_bwlimited.so'>Google search</a>, I <a href='http://www.mydigitallife.info/2007/02/14/starting-apache-httpd-failed-due-to-cannot-open-or-no-such-mod_bwlimited-mod_log_bytes-or-mod_bandwidth-files/'>found</a> that I needed to run:</p>
<pre><code>cd /usr/local/cpanel/apache

/usr/local/apache/bin/apxs -iac mod_auth_passthrough.c
/usr/local/apache/bin/apxs -iac mod_bwlimited.c
/usr/local/apache/bin/apxs -iac mod_log_bytes.c
</code></pre>
<p>I was able to start Apache afterwards and everything is back to normal...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/shared-object-error-during-cpanel-apache-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Bug &#8211; glob(), GLOB_BRACE, and Windows paths</title>
		<link>http://www.ericmmartin.com/php-bug-glob-glob_brace-and-windows-paths/</link>
		<comments>http://www.ericmmartin.com/php-bug-glob-glob_brace-and-windows-paths/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 20:26:39 +0000</pubDate>
		<dc:creator>Eric Martin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ericmmartin.com/general/php-bug-glob-glob_brace-and-windows-paths/</guid>
		<description><![CDATA[I stumbled upon a PHP framework called Kohana, which is based on CodeIgniter. I've used CI a bit in the past and thought I'd give Kohana a whirl. I downloaded the latest code and tried to run it on a Windows XP machine. Well, when I brought up the site, I got an error: Fatal [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled upon a PHP framework called <a href="http://kohanaphp.com/" target="_blank">Kohana</a>, which is based on <a href="http://codeigniter.com/" target="_blank">CodeIgniter</a>. I've used CI a bit in the past and thought I'd give Kohana a whirl. I downloaded the latest code and tried to run it on a Windows XP machine.</p>
<p>Well, when I brought up the site,  I got an error:</p>
<pre><code>Fatal error: Unable to locate the requested file, log.php in &lt;system_path&gt;/system/core/Kohana.php on line 408
</code></pre>
<p>After a lot of digging, I found that there was a glob() call that was not behaving correctly. I narrowed it down to what I believe to be a <a href="http://bugs.php.net/bug.php?id=42501" target="_blank">bug</a> in PHP with the <a href="http://us3.php.net/glob" target="_blank">glob() function</a>, using the GLOB_BRACE flag, and using a pattern that includes a colon (as in <code>{c:/firstFolderToCheck,c:/secondFolderToCheck}</code>).</p>
<p>Assuming it turns out to be valid, I'm surprised that it hasn't been found/reported before...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmmartin.com/php-bug-glob-glob_brace-and-windows-paths/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
