Yii reading volume

when the yii framework did the function of increasing the number of articles read today, it was found that the number of readings increased by 2

each visit.

later found that whenever I render the template and layout in the controller, the controller is executed twice.

later, I found that as long as I set layout to false or there is no html code in layout, the controller will execute once, there is html code in a single layout, and the controller will execute twice immediately. Once again,
clipboard.png
found that the amount of reading on endpage has increased by 1. Once under endpage, the number of readings will increase by 2

each visit.

Please ask, has anyone encountered this problem and how to solve it? thank you

Mar.02,2021

it is found that empty elements such as href='' or class='' cannot appear. Just remove the poster='' or poster and add a poster

.

if you add it to the controller, you shouldn't have this problem. If you use JS to call a special link to add it, you shouldn't have this problem. Just don't do it in the view view.

Menu