I'm happy to announce the release of mojoPortal 220.127.116.11, available now on the download page.
Refactored the core meta data system to make it easier for features to control the meta data for their own content. Now you have per post control of the meta data in the blog. Its now possible to use html in the excerpts. If you enable excerpts and don't enter an excerpt, we still generate a plain text one for you of the configured length, but you now have the flexibility to specify the content of the excerpt so you can use images and html, but in that case we don't truncate anything so as not to lose any closing tags, so its up to you to determine how much to include in the excerpt.
Also added meta data support for products so you can optimise SEO for product pages. Also products are now indexed into the site search index and can be found using site search.
Site Search Improvements
I added paging to the results. Previously we just brought back up to 200 results and it was up to you to refine your search if you didn't find what you were looking for. Now you can page through all of the results no matter how many there are.
404 Page Not Found Handler
When a user clicks a broken link to your site or types an url incorrectly, they typically get what is known as a 404 page not found error. 404 s the status code that indicates to the browser (or crawler) that the page was not found. Web servers like IIS and apache have a page about the error that is shown to the user by default in that case but its not the most friendly thing. It is possible to customize the 404 page in IIS or apache, but typically we would rather control it from within our application. The prevailing technique for doing this in ASP.NET has been to declare a custom 404 page in Web.config like this:
<customErrors mode="RemoteOnly" defaultRedirect="yourcustomerrorpage.aspx">
<error statusCode="404" redirect="~/PageNotFound.aspx" />
allowing you to customize the 404 page and make it a little more user friendly. The problem with this technique is that when it does the redirect it never delivers the 404 status code, it provides a friendly experience to the user by redirecting to a page that does exist so no 404 really occurs as far as the browser knows. This is bad for search engine crawlers because they don't see the broken links either and you don't find out about them as you should from google webmaster tools. Its better if you can get reports about the broken links in your site and fix them. So what you really want is a custom 404 page that provides friendly content but still delivers the 404 status code, but redirecting to this page is what will prevent the status. You could set a status code from within your custom 404 page but since you redirected it won't report the correct url because you are now at the error page url not the missing url. Redirecting is not the correct solution, its just easy.
So I implemented an HttpModule to trap exceptions that indicate 404 errors and instead of redirecting I keep the current url and set the response status code to 404 then I make a server side web request to the custom 404 page to get its content and then just write the content into the reponse. So in effect I deliver the content of the custom 404 page but stay on the incorrect url so the status code will indicate that this url was not found. You can see the status code in the screen shot below where I have firebug showing the status of the request. I've also added the google 404 enhancement javscript to the cutom 404 page, so for example if a user typos the url for the download page (as shown below in the screen shot) as dwnload.aspx instead of download.aspx, google is smart enough to suggest the correct page.
This seems like an ideal solution as the user gets a friendly page with good suggestions and the crawlers get the correct story about broken urls.
There were a number of bugs reported in the forums since the last release which have been fixed. There were some problems with the setup scripts for MySql that affected some installations. There were a number of small bugs resulting from the re-organisation of the code. I think most of these are now shaken out and though the last release was a little bumpy the benefits of the new code structure were worth the trouble.
People often complain about having to upload all the files again, but generally this is always the best thing to do to make sure you don't miss any of the new files. We are on short release cycles so it tends to amplify the problem for those who like to upgrade every release. For this release, if you are upgrading from 18.104.22.168, you can skip uploading the ClientScript folder and Data folder as nothing changed there since the last release. Those are 2 big folders, so it will save you some upload time. Be sure and upload all the rest of the files though, and if upgrading from older versions upload all the files.
Lots of other fun stuff going on. I've been prototyping some things in Silverlight that I will blog more on later.