While working on a small GWT project with two other developers I ran into an odd runtime exception “com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException” as I was testing my app in the hosted mode I’m not sure how to refresh that built in browser which is the listed fix. What I ended up doing was a simple clean of the project which solved my problem, I think it relates to how I’m using SVN not integrated into Eclipse with the project yet its hard to tell. But if you run accross this expection try a simple clean before pulling too much hair out.

This may not come up that often but if you are using Get parameters such as lets say submitted by a form to filter some weblog entries, these parameters will not be preserved while using the built in pagination. This can be a real issue if you are trying to filter results and let users page through them but we can add a touch of PHP and fix this issue. In your paginate tags we just need to add the query string to the page link. You’ll notice in the sample we use the server parameter ‘query_string’ along with the question mark which will produce our correct links.

{if previous_page}
<a href=“{auto_path}<?php echo ”?“.$SERVER[‘QUERY_STRING’]; ?> class=‘paginate-previous’>Previous</a>
{if next_page}
<a href=“{auto_path}<?php echo ”?“.$SERVER[‘QUERY_STRING’]; ?> class=‘paginate-next’>Next</a>

While working with an ExpressionEngine based site I ran across a listing of a weblog that could contain 1000′s of posts yet as it was displayed with the Dynamic Parameter off there was no stock way to support Pagination of the items. I used a simple hack, shown at the end of the post, that allowed me to use the pagination but it shows a bigger issue with ExpresionEngine, while it may not come up that often there still should be pagination for any `exp:weblog:entries set but it is not. There is no reason that non-dyanmic listings shouldn’t be paginated if anything it would be more likely needed as they are likely to be a long list of a whole set.

The hack I used to enable pagination while the dynamic=“off” was available here on the ExpressionEngine Wiki but as it is a wiki I felt that I should give you the basics here as well.

In `system/modules/weblog/mod.weblog.php find the comment “Parse page number” you need to simply remove the AND $dynamic from the if statment to allow for the pagination use inside a non-dynamic weblog listing.

Start with:

if (preg_match(“#^P(\d+)|/P(\d+)#”, $qstring, $match) AND $dynamic)

Change to:

if (preg_match(“#^P(\d+)|/P(\d+)#”, $qstring, $match) )

While using wget with authorization to download some data you may run into the problem of having a special character such as ‘>’ in your password. It’s a simple fix of wrapping your password in quotes. But the only error message that this problem will give is an authentication failure.

So many times it is nice to add a dynamic graph to a web page. I’ve personally done this with JavaScript libraries like PlotKit or Plotr. Also there is the use of Flash with PHP or ASP.Net in amCharts. But if the user doesn’t have Flash or JavaScript turned off these tools fail. While this doesn’t happen too often any more it still may be an issue. But one issue I’ve noticed is that these charts do take a lot of resources to run so if you have visitors with slower computers that may be a real issue.

So we need a simple alternative, such as generating an image server side and serving that up. While this isn’t too difficult you may not have an imaging library available or the resources to spare. That is where Google Charts comes in with their simple API you can quickly add graphs to your web page. It’s really simple just embed a special URL in an image tag which you can easily make dynamic with PHP, ASP, or any dynamic system you’re using. See the example below. It works very well, with minimal setup and no added software for clients is needed.

alt=“Sample chart” />

Sample chart

In an earlier post, I reported that the TR element in IE6/IE7 had a read only innerhtml. I have found a way to get around this while not perfect it works. It turns out while the TR’s innnerhtml is read only a TD is not. So you can add a TD with a column span equal to the total column in the table. Then you can add what you wanted to the TD’s innerhtml. Check out the example code below.

function addrow(http_request,elm)
var temp= http_request;
var tablebody = elm.tBodies[];
var row = tablebody.insertRow(elm.rows.length-1);
var cell = row.insertCell(-1);
cell.colSpan = “6”;
cell.innerHTML = “<table style=‘margin:0; padding:0; width:100%’ border=‘1’><tr>”+temp+“</tr></table>”;
} catch (e)
var row = tablebody.insertRow(elm.rows.length-1);
row.id =“sctablerow”+nextelm.value;
row.innerHTML = temp;

So I encountered this odd error while working with the Crystal Reports XI Java Report Viewer. It showed up as “java.lang.IncompatibleClassChangeError: Implementing class” this has been one of the more cryptic messages from Java that I’ve had in a while. So a quick search turned up that this error can occur when parts of the Java Project have been compiled at separate times. So I did a quick clean build, well not that quick. Unfortunately I still got the error at run time. It was only happening with Crystal Reports so with some more digging I finally found that ReportViewer.jar and jrcerom.jar must be the first two jars in the class path to work. While I this is the first time in Java I’ve seen this it wasn’t too hard to fix. While using NetBeans in the library tab there are buttons to change the order of the files, unfortunately if you aren’t using NetBeans you will have go in and change the class path files by hand.

While building a simple shopping cart I was adding an update link so customers could easily update the cart quantities I would have done Ajax but we are on a time crunch and it would be more billable so get this much working now add the rest in the second phase. So I have my normal submit button, called submit and I wanted a simple link that said update that would submit the form to another page. Well thats not hard so I simply changed the action of the form and called the submit function, as seen below.

document.getElementById(“cartform”).action = ‘cart.php?action=update’;

Well that should work fine, oh but no it doesn’t nothing at all was happening it was very odd. So I got out the error console and find that submit is not a function. Well thats odd. So I assume that I have and outdated reference for JavaScript so I dig around and all the example I see work just fine. After staring at it for what seemed hours I thought it better not be over writing the submit function for the form with the button named submit. Well it was, SOB. So if you make sure to not overwrite functions of forms with your field names, its just a big headache.

So working with these two relatively new systems I’ve come to the surprising conclusion that I like Amazon’s better. I find it odd because I’m normally a bit of a Google fanboy. I should explain more this conclusion is not for all cases there are many thing you can do with one you can’t with the other, but for the basic case I was trying to set up Amazon FPS worked much better. I wanted to create a simple checkout that allowed me to generate accounts after the payment was processed. Sounds pretty simple I did something like this with 1Shoppingcart.com and if they made it easy Google and Amazon should make it a snap.

So reading up on Google Checkout I found one surprising thing, I have to have some sort of certificate, well I think the documentation was a bit confusing. That is for the level 2 API integration and that seems to be what I wanted so I could process the information after they paid. Well I don’t want to get the secure stuff setup don’t want the bother or the cost of it, I would if this was going to be a real big deal site but its just a small project that at this point needs low costs and quick implementation more then keeping 1 or 2 people from creating a bogus login.

So I started looking at Amazon FPS and to start the documentation was much more approachable not sure if it was the content or the general layout but I found what I wanted in about 1/10th of the time. They have a nice section explaining how to make a dynamic button which is perfect and then describe how to sign the button when code samples, and the best part is they have many languages Java, PHP, and Perl to name the once I quick saw. The best part is that the callback URL can just be any URL no need for https so this makes it fit right into my current system.

Overall I found Amazon FPS quick and easy to implement a system with that interacted back with my site while with Google you can make quick Buy It Now buttons the integration back into the my system was not as easy and Google Checkout is very geared towards physical items that you ship while Amazon FPS doesn’t seem to really tie me into that. Maybe someone trying to sell physical items on Amazon FPS will have issues I’m not sure but I would love to hear any experiences.

I have taken over support of a Python CGI application, no big deal seems like an ok code base and the fixes seem simple. The first fix that needed to be done was a very simple change to some wording which required me to change a cgi file so I made the change tested it and it all worked on my dev system so I then uploaded the file over FTP to the server and nothing worked. So after lots of debugging trying all sorts of things, I remembered something about the binary and ASCII transfer settings for FTP. Mine was set to binary so I switched it over to ASCII uploaded the file again and sure enough everything worked again.

So as a word of advice when working with CGI and FTP always check your transfer settings, had I done this when I started I wouldn’t have wasted hours of my night.