Closed wmarkow closed 8 years ago
According to MyBB 1.8.6 source code, when there are some PHP errors handled during request processing then "run_shutdown" method (where shutdown queries are executed; thread's views counter as well) skips executing the shutdown queries. Further investigation shows that plugin generates some errors/warnings when loading HTML dom documents.
Here are some logs collected by MyBB engine:
<error>
<dateline>1450822498</dateline>
<script>inc/plugins/wordpress_theme.php</script>
<line>118</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 132</message>
</error>
<error>
<dateline>1450822498</dateline>
<script>inc/plugins/wordpress_theme.php</script>
<line>130</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>DOMDocument::loadHTML(): ID top already defined in Entity, line: 129</message>
</error>
<error>
<dateline>1450822498</dateline>
<script>inc/plugins/wordpress_theme.php</script>
<line>130</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>DOMDocument::loadHTML(): ID pid82330 already defined in Entity, line: 349</message>
</error>
According to this and thisit looks like libxml library generates errors for not well formated html (wordpress page or mybb page).
Fixed.
Threads view counter does not get increased when users read the thread. It works fine when mybb-wordpress-theme plugin is disabled so the plugin has some impact to MyBB main processing.