Yii Framework Forum: A strange problem of Widget - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

A strange problem of Widget Rate Topic: -----

#1 User is offline   Shrek 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 01-April 10

Posted 28 May 2012 - 08:46 PM

Dear all,

Here is the problem, I created a widget under extensions folder, everytime I use it in a view under a controller's action. it works perfectly fine. Until I move the code into layouts/main.php, to display it at footer for all pages. While I've done this, everytime the page loads, the sql queries are runned twice (I checked mysql.log). while I move back to controller's view, it runs only once again. I tried echo something in the run snippet of the widget, it output only once, sql still runs twice...

Any hint is greatly appreciated.

BR.
0

#2 User is offline   Shrek 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 01-April 10

Posted 28 May 2012 - 10:42 PM

update.. there is a image 404 error, after a fix, the issue is gone.

however, it is a real confusion.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users