some hooks request page twice - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: some hooks request page twice (/showthread.php?tid=66437) |
some hooks request page twice - Tecvid - 10-22-2016 good day! when i use post_controller_constructor, post_controller or display_override hooks, pages requested twice, so all of requests to db also requested twice, and because of the code below which increments post views there is an illusion that views are incremented by 2 PHP Code: public function update_views($news_id) or maybe the problem is in my hook function, but where? i am not able to find, my hook contains only this function: PHP Code: if ( ! function_exists('minify_html')) p.s: pls dont advice me to use minify libraries if there is no problem in preg_replace part just help me find the real probem |