A strange problem of Widget

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.


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

however, it is a real confusion.