There was a time when this site was 100% xhtml valid. It didn't last long, as as soon as I forgot to correctly close a tag anywhere on the page, or added some beta-ish new functionality, or updated my cake version inevitably something became invalid. I used the Xhtml Validation helper for a while, but the messages it generated got in the way rather than helping. I still use it for certain tasks, such as checking comments and these blogs for well-formedness, it's a handy class of that there's no doubt but not the way I was trying to use it.
For this site my primary concern is that the code is at least well-formed and preferably 100% valid (xhtml). But rather than trust the W3 Validator to tell me my pages are fine; there's a much faster way to both detect and prompt fixing fundamental errors: Public Embarrassment.
Routes are a great feature, but if you try using them with Plugins you might find that you start pulling your hair out. Fear not however, there's always a solution and it's usually not that difficult. If you use routes of the form below, you can map directly to a plugin's page:
[Code]Easy when you know how.
One word of warning though, the first parameter in this route has a default which is the controller action. This means that if you create route which expect parameters (as I did in the example) it will work with no parameters, but if any parameters are passed the first one will be understood to be the method name.
If you use MPTT tables anywhere (The cake acl system uses it) you may have found that when you delete an entry, the lft and rght fields for the neighouring nodes don't get updated. This may have rather dire concequences ;)
There is an open ticket for how to delete from the cake acl tables, but as it is potentially quite generic, I thought I'd include the (potential) fix here. Below are two versions of a delete method, one takes care of associations, and the other doesn't:
[Code]Should anybody use this and find it causes a problem please let me know.
In the site update, this little tidbit went missing, so here it is again:










