Monday, April 8, 2013

Codeigniter 2 Template Render Doubling

I've been using This Template in my CI 2 app heavily.
And suddenly something happens very awkward today.
Everything seems rendered twice.

I've tried to var_dump in the Template.php line 549,
it returned me:
array
  '_scripts' => boolean false
  '_styles' => boolean false
  'header' => boolean false
  'content' => boolean false
  'footer' => string ' ' (length=1)
array
  '_scripts' => boolean false
  '_styles' => boolean false
  'header' => boolean false
  'content' => boolean false
  'footer' => string ' ' (length=1)

Then i add debug_backtrace(), a very handy func,
right before the var_dump. I was shocked since
render() func was called in one of my model,
was accidentally pasted.

Hope it helps

Flask SQLAlchemy FormAlchemy

Finally ericflo has done a great work, as the integration
reference, and hosted it at github. I've spent almost 2-3 hours
to search how Flask request.form data to be sent
into formAlchemy. Make sure you want to visit his great
work, 72 lines of a reference won't hurt you :P

Hope it helps

Wednesday, April 3, 2013

Codeigniter 2.1.2 Disallowed Key Characters

Following up this thread well it just happened that my ci 2
application won't load up and only showed me "Disallowed
Key Characters" on screen. Arrghhhh... hate to say this but
the only way i got this fixed is to modify the core!

Go to your %system/core/Input.php and find
"if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))".
Modify it to
"if ( ! preg_match("/^[a-z0-9:_\/-\|]+$/i", $str))".
It stops showing me the disallowed key error.

Anyway right before i touched the core, had tried
to add the "|" char in to %application/config/config.php.
But nothing seems to be happened and error screen
still showing.

Hope it helps.