Posts Tagged ‘gotcha

Just a quick bit of advice to those who may have been banging their heads against the walls when trying to pass “form” as a custom parameter in a CakePHP URL. Apparently ‘form’ is a param – an array, to be specific – that’s already set by Cake and using it as a custom parameter [...]

Apparently custom prefixes and custom named arguments in URLs don’t mix all that well in good ol’ CakePHP. I’ve got a StatisticsController with some custom_-prefixed actions. So, in routes.php I added this line to parse the URLs: Router::connect('/statistics/custom/:action/*', array('prefix' => 'custom', 'controller' => 'statistics', 'custom' => true)); Straightforward enough, right? And to generate a link [...]

Watch out when using ‘image’ input types, since the $_REQUEST variables you get vary depending on the user’s browser. Let’s say you’ve got this input field: <input type="image" src="go.png" value="go" name="pagination_submit" /> In Firefox (and I assume most other logical browsers) you’ll get three $_REQUEST variables from this input: ‘pagination_submit’, ‘pagination_submit_x’, and ‘pagination_submit_y’, where the [...]


top