Posts Tagged ‘CakePHP’

302 error in CakePHP with SWFUpload

I encountered this issue in one of my recent projects.

Basically I use SWFUpload to post files to a CakePHP controller. It was working beautifully, until I inadvertently removed 1 (yes, just one) line of code in beforeFilter():

$this->Auth->allow("swfupload");

I was using the Auth component, and without the line above to allow “not logged in” access to the controller action, then we have a problem.

Hope this helps somebody.

Embedding Flash in HTML, versus iframe

I recently received a request to develop a CakePHP website. The interface consists of a container 800 by 250 pixels width, with practically no chrome (company name, copyright info) whatsoever. It’s shows calendar entries for a given period, and users can click to view entry details (in a Thickbox). I thought the design was rather simplistic, and gave it no further thought. The project was completed in about 2 days, and I spent an additional 1.5 days making some minor changes.

Today I realized that simple design was because it was intended to replace a Flash-based calendar on the client’s homepage. I did a test with iframe, but it doesn’t work well, because the Thickbox (with entry details) is contained within the iframe.

Note to self: Clarify intended deployment method before giving price information. No hard feelings of course, since they might not understand that embedding Flash is not the same as iframe. Now it’s likely I’ll need to spend more time doing it right; i.e. template-ize their HTML, and then put in the (micro) website that I completed earlier.

New blog URL, new sandbox site

You may have noticed the new ‘blog’ suffix in this blog’s URL now.

I’ve setup a site where visitors can take a look at demos of my work.

Here you go

Instead of the (STILL much-loved) CodeIgniter PHP framework, it’s running a recent version of CakePHP. I’ve been using it for a recent project, and I must say, it has more functions but is harder to learn.

For client-side scripting, I am still using jQuery/jQuery UI, although I have been (re)learning Prototype/Scriptaculous of late.

Have fun!

Return top