Controller in Kohana 3 does not appear to work, but has in the background -


my client finding when hit delete nothing happens, if it again error that 'id' doesn't exist anymore.

i find hard believe because it's leaving page , being redirected post.

the link in view:

<h4>current logo image <span class='del'>  (<?= html::anchor("playlist/imgdelete/$playlist->id/$logo->type", 'delete'); ?>) </span></h4> 

the controller process:

public function action_imgdelete($id, $type) {     db::delete('images')->where('playlist_id', '=', $id)                         ->where('type', '=', $type)->execute();     message::success('image deleted');     request::current()->redirect("playlist/edit/$id"); } 

does know how can possible?

this due double chokehold cache between kohana , browser of choice.

the delete action have occurred, because of aggressiveness, cache of page not show change. hitting again invalid since you've performed action, nothing has visually registered on end.

you can around putting in no-cache header tag in template:

<meta http-equiv="cache-control" content="no-cache" /> 

the default cache life set kohana minute:

/**  * @var  integer  default lifetime caching, in seconds,   *                 used [kohana::cache]. set [kohana::init]  */ public static $cache_life = 60; 

you can tweak system/classes/kohana/core.php


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -