Template Errors: dark_postrating_member_totals

  1. Division by zero in /home/bamvn/domains/bam.vn/public_html/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 59:
    58: {
    59: $__compilerVar2 .= '<div class="dark_postrating_bar_positive" title="' . XenForo_Template_Helper_Core::numberFormat($postrating_ratings_total['positive'], '0') . '" style="width:' . ($postrating_ratings_total['positive'] / $postrating_ratings_total['all'] * 100) . '%"></div>';
    60: }
    

Page Time: 0.1016s

Memory: 14.0257 MB (Peak: 14.7733 MB)

Queries (26, time: 0.0084s, 8.3%)

  1. SELECT data_key, data_value
    FROM xf_data_registry
    WHERE data_key IN ('options', 'languages', 'contentTypes', 'codeEventListeners', 'cron', 'simpleCache', 'routesPublic', 'nodeTypes', 'bannedIps', 'discouragedIps', 'styles', 'displayStyles', 'smilies', 'bbCode', 'threadPrefixes', 'trophyUserTitles', 'reportCounts', 'moderationCounts', 'userModerationCounts', 'notices', 'userFieldsInfo')
    Run Time: 0.000899
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_data_registryrangePRIMARYPRIMARY77 21Using where
  2. SELECT cache_value
    FROM xf_permission_combination
    WHERE permission_combination_id = ?
    Params: 1
    Run Time: 0.000152
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_permission_combinationconstPRIMARYPRIMARY4const1 
  3. SELECT data_value
    FROM xf_data_registry
    WHERE data_key = ?
    Params: dark_postrating_ratings
    Run Time: 0.000116
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_data_registryconstPRIMARYPRIMARY77const1 
  4. SELECT user.*
    	,
    		user_profile.*,
    		user_option.*,
    		user_privacy.*,
    		IF (session_activity.view_date IS NULL, user.last_activity, session_activity.view_date) AS effective_last_activity,
    		session_activity.view_date, session_activity.controller_name, session_activity.controller_action, session_activity.params, session_activity.ip,
    		0 AS following_0
    				,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,14)) as positive_rating_count
    			
    			,(select sum(count_received) from dark_postrating_count where user_id = user.user_id) as total_rating_count
    		
    FROM xf_user AS user
    
    		INNER JOIN xf_user_profile AS user_profile ON
    			(user_profile.user_id = user.user_id)
    		INNER JOIN xf_user_option AS user_option ON
    			(user_option.user_id = user.user_id)
    		INNER JOIN xf_user_privacy AS user_privacy ON
    			(user_privacy.user_id = user.user_id)
    		LEFT JOIN xf_session_activity AS session_activity ON
    			(session_activity.user_id = user.user_id AND session_activity.unique_key = user.user_id)
    WHERE user.user_id = ?
    Params: 67879
    Run Time: 0.000716
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    PRIMARYuserconstPRIMARYPRIMARY4const1 
    PRIMARYuser_profileconstPRIMARYPRIMARY4const1 
    PRIMARYuser_optionconstPRIMARYPRIMARY4const1 
    PRIMARYuser_privacyconstPRIMARYPRIMARY4const1 
    PRIMARYsession_activityconstPRIMARYPRIMARY8const,const0unique row not found
    DEPENDENT SUBQUERYdark_postrating_countrefuser_id_ratinguser_id_rating4const1 
    DEPENDENT SUBQUERYdark_postrating_countALLuser_id_rating   4Using where
  5. SELECT COUNT(*)
    FROM xf_profile_post AS profile_post
    
    WHERE (profile_post.profile_user_id = 67879) AND (profile_post.message_state IN ('visible'))
    Run Time: 0.000241
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEprofile_postrefprofile_user_id_post_dateprofile_user_id_post_date4const5Using where
  6. SELECT profile_post.*
    	,
    	posting_user.*,
    	IF(posting_user.username IS NULL, profile_post.username, posting_user.username) AS username,
    	0 AS like_date
    FROM xf_profile_post AS profile_post
    
    	LEFT JOIN xf_user AS posting_user ON
    		(posting_user.user_id = profile_post.user_id)
    WHERE (profile_post.profile_user_id = 67879) AND (profile_post.message_state IN ('visible'))
    ORDER BY profile_post.post_date DESC
     LIMIT 15
    Run Time: 0.000487
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEprofile_postrefprofile_user_id_post_dateprofile_user_id_post_date4const5Using where
    SIMPLEposting_usereq_refPRIMARYPRIMARY4bamvn_bamvn.profile_post.user_id1 
  7. SELECT user_field.*
    	,
    	field_value.field_value
    FROM xf_user_field AS user_field
    
    	LEFT JOIN xf_user_field_value AS field_value ON
    		(field_value.field_id = user_field.field_id AND field_value.user_id = 67879)
    WHERE (user_field.display_group <> 'preferences' AND user_field.viewable_profile = 1)
    ORDER BY user_field.display_group, user_field.display_order
    Run Time: 0.000288
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEuser_fieldALLdisplay_group_order   9Using where; Using filesort
    SIMPLEfield_valueeq_refPRIMARY,field_idPRIMARY81const,bamvn_bamvn.user_field.field_id1 
  8. SELECT COUNT(*)
    FROM xf_user_follow
    WHERE follow_user_id = ?
    Params: 67879
    Run Time: 0.000097
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_user_followreffollow_user_idfollow_user_id4const1Using index
  9. SELECT user.*,
    	user_profile.*,
    	user_option.*
    	
    				,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,14)) as positive_rating_count
    			
    			,(select sum(count_received) from dark_postrating_count where user_id = user.user_id) as total_rating_count
    		
    FROM xf_user_follow AS user_follow
    INNER JOIN xf_user AS user ON
    	(user.user_id = user_follow.user_id)
    INNER JOIN xf_user_profile AS user_profile ON
    	(user_profile.user_id = user.user_id)
    INNER JOIN xf_user_option AS user_option ON
    	(user_option.user_id = user.user_id)
    	
    WHERE user_follow.follow_user_id = ?
    ORDER BY RAND()
     LIMIT 6
    Params: 67879
    Run Time: 0.000647
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    PRIMARYuser_followrefPRIMARY,follow_user_idfollow_user_id4const1Using index; Using temporary; Using filesort
    PRIMARYusereq_refPRIMARYPRIMARY4bamvn_bamvn.user_follow.user_id1 
    PRIMARYuser_optioneq_refPRIMARYPRIMARY4bamvn_bamvn.user.user_id1Using where
    PRIMARYuser_profileeq_refPRIMARYPRIMARY4bamvn_bamvn.user_follow.user_id1 
    DEPENDENT SUBQUERYdark_postrating_countrefuser_id_ratinguser_id_rating4bamvn_bamvn.user.user_id1 
    DEPENDENT SUBQUERYdark_postrating_countrefuser_id_ratinguser_id_rating4bamvn_bamvn.user.user_id1Using where
  10. INSERT INTO `xf_session` (`session_id`, `session_data`, `expiry_date`) VALUES (?, ?, ?)
    Params: 09cf2e629ae3e5ad40d3208fe4bba0b8, a:7:{s:12:"sessionStart";i:1490666307;s:2:"ip";i:916427947;s:9:"userAgent";s:39:"CCBot/2.0 (http://commoncrawl.org/faq/)";s:7:"isRobot";b:0;s:16:"previousActivity";i:0;s:10:"isIpBanned";b:0;s:13:"isDiscouraged";b:0;}, 1490669907
    Run Time: 0.000127
  11. INSERT INTO xf_session_activity
    	(user_id, unique_key, ip, controller_name, controller_action, view_state, params, view_date)
    VALUES
    	(?, ?, ?, ?, ?, ?, ?, ?)
    ON DUPLICATE KEY UPDATE
    	ip = VALUES(ip),
    	controller_name = VALUES(controller_name),
    	controller_action = VALUES(controller_action),
    	view_state = VALUES(view_state),
    	params = VALUES(params),
    	view_date = VALUES(view_date)
    Params: 0, 916427947, 916427947, XenForo_ControllerPublic_Member, Member, valid, user_id=67879, 1490666307
    Run Time: 0.000060
  12. select value, hits 
    from dark_azucloud_terms_pages pages 
    left join dark_azucloud_terms terms on pages.term_id = terms.id 
    where route = ? and terms.block = 0 and terms.value is not null and last_clicked > ? 
    order by hits desc, last_clicked desc
    limit ?
    Params: members/ncsongtu.67879/, 1488074307, 10
    Run Time: 0.000243
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEpagesrefterm_id_route,route,route_hits_last_clickedroute_hits_last_clicked452const1Using where
    SIMPLEtermseq_refPRIMARY,value,blockPRIMARY4bamvn_bamvn.pages.term_id1Using where
  13. SELECT *
    FROM kingk_bbcm
    ORDER BY tag
    Run Time: 0.000270
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEkingk_bbcmALL    5Using filesort
  14. SELECT title, template_compiled
    FROM xf_template_compiled
    WHERE title IN ('page_nav', 'bb_code_tag_vfchh', 'tinhte_xentag_bb_code_tag_tag', 'bb_code_tag_code', 'bb_code_tag_php', 'bb_code_tag_html', 'bb_code_tag_quote', 'bb_code_tag_attach', 'member_view', 'EWRmedio_Navtabs', 'xenCODE_Meta_Keywords', 'tinhte_xentag_hook_message_content', 'tinhte_xentag_hook_message_notices', 'tinhte_xentag_hook_post_private_controls', 'tinhte_xentag_hook_post_public_controls', 'wf_hook_moderator_bar', 'wf_revealer', 'PAGE_CONTAINER')
    	AND style_id = ?
    	AND language_id = ?
    Params: 4, 3
    Run Time: 0.000337
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_template_compiledrangePRIMARYPRIMARY160 18Using where
  15. SELECT title, phrase_text
    FROM xf_phrase_compiled
    WHERE language_id = ?
    	AND title IN ('user_field_sodienthoai_desc', 'user_field_aim_desc', 'user_field_msn_desc', 'user_field_icq_desc', 'user_field_yahoo_desc', 'user_field_skype_desc', 'user_field_gtalk_desc', 'user_field_facebook_desc', 'user_field_twitter_desc', 'media')
    Params: 3
    Run Time: 0.000216
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_phrase_compiledrangePRIMARYPRIMARY231 10Using where
  16. SELECT count_given as rating_count, rating, 1 as given
    FROM dark_postrating_count
    WHERE user_id = ?
    
    UNION                
    
    SELECT count_received as rating_count, rating, 0 as given
    FROM dark_postrating_count
    WHERE user_id = ?
    
    ORDER BY rating_count desc, rating asc
    Params: 67879, 67879
    Run Time: 0.000202
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    PRIMARYdark_postrating_countrefuser_id_ratinguser_id_rating4const1 
    UNIONdark_postrating_countrefuser_id_ratinguser_id_rating4const1 
    UNION RESULT<union1,2>ALL     Using filesort
  17. SELECT COUNT(*)
    FROM xf_liked_content
    WHERE like_user_id = ?
    Params: 67879
    Run Time: 0.001333
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_liked_contentindex content_type_id_like_user_id85 7519Using where; Using index
  18. SELECT title, phrase_text
    FROM xf_phrase_compiled
    WHERE language_id = ?
    	AND title IN ('likes_received')
    Params: 3
    Run Time: 0.000091
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_phrase_compiledconstPRIMARYPRIMARY231const,const1 
  19. SELECT title, template_compiled
    FROM xf_template_compiled
    WHERE title IN ('dark_postrating_member_totals')
    	AND style_id = ?
    	AND language_id = ?
    Params: 4, 3
    Run Time: 0.000090
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_template_compiledconstPRIMARYPRIMARY160const,const,const1 
  20. SELECT count_given as rating_count, rating, 1 as given
    FROM dark_postrating_count
    WHERE user_id = ?
    
    UNION                
    
    SELECT count_received as rating_count, rating, 0 as given
    FROM dark_postrating_count
    WHERE user_id = ?
    
    ORDER BY rating_count desc, rating asc
    Params: 67879, 67879
    Run Time: 0.000134
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    PRIMARYdark_postrating_countrefuser_id_ratinguser_id_rating4const1 
    UNIONdark_postrating_countrefuser_id_ratinguser_id_rating4const1 
    UNION RESULT<union1,2>ALL     Using filesort
  21. SELECT COUNT(*)
    FROM xf_liked_content
    WHERE like_user_id = ?
    Params: 67879
    Run Time: 0.001231
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_liked_contentindex content_type_id_like_user_id85 7519Using where; Using index
  22. SELECT title, template_compiled
    FROM xf_template_compiled
    WHERE title IN ('dark_postrating_member')
    	AND style_id = ?
    	AND language_id = ?
    Params: 4, 3
    Run Time: 0.000110
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_template_compiledconstPRIMARYPRIMARY160const,const,const1 
  23. SELECT COUNT(*) AS total
    	FROM EWRmedio_media
    WHERE EWRmedio_media.user_id = 67879
    	AND EWRmedio_media.media_state = 'visible'
    Run Time: 0.000084
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEEWRmedio_mediarefuser_iduser_id4const1Using where
  24. SELECT COUNT(*) AS total
    	FROM EWRmedio_media
    WHERE EWRmedio_media.user_id = 67879
    	AND EWRmedio_media.media_state = 'visible'
    Run Time: 0.000080
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLEEWRmedio_mediarefuser_iduser_id4const1Using where
  25. SELECT title, template_compiled
    FROM xf_template_compiled
    WHERE title IN ('dark_azucloud')
    	AND style_id = ?
    	AND language_id = ?
    Params: 4, 3
    Run Time: 0.000096
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_template_compiledconstPRIMARYPRIMARY160const,const,const1 
  26. SELECT title, template_compiled
    FROM xf_template_compiled
    WHERE title IN ('bbcm_js')
    	AND style_id = ?
    	AND language_id = ?
    Params: 4, 3
    Run Time: 0.000088
    Select TypeTableTypePossible KeysKeyKey LenRefRowsExtra
    SIMPLExf_template_compiledconstPRIMARYPRIMARY160const,const,const1 

Included Files (152, XenForo Classes: 58)

  1. index.php
  2. library/XenForo/Autoloader.php
  3. library/XenForo/Application.php
  4. library/Zend/Registry.php
  5. library/Lgpl/utf8.php
  6. library/Zend/Config.php
  7. library/config.php
  8. library/XenForo/FrontController.php
  9. library/XenForo/Dependencies/Public.php
  10. library/XenForo/Dependencies/Abstract.php
  11. library/Zend/Controller/Request/Http.php
  12. library/Zend/Controller/Request/Abstract.php
  13. library/Zend/Uri.php
  14. library/Zend/Controller/Response/Http.php
  15. library/Zend/Controller/Response/Abstract.php
  16. library/XenForo/Model.php
  17. library/XenForo/Model/DataRegistry.php
  18. library/XenForo/CodeEvent.php
  19. library/Zend/Db.php
  20. library/Zend/Db/Adapter/Mysqli.php
  21. library/Zend/Db/Adapter/Abstract.php
  22. library/Zend/Db/Select.php
  23. library/Zend/Db/Expr.php
  24. library/Zend/Db/Profiler.php
  25. library/Zend/Db/Statement/Mysqli.php
  26. library/Zend/Db/Statement.php
  27. library/Zend/Db/Statement/Interface.php
  28. library/Zend/Db/Profiler/Query.php
  29. library/XenForo/Options.php
  30. library/XenForo/Link.php
  31. library/XenForo/Template/Helper/Core.php
  32. library/EWRmedio/Listener/Init.php
  33. library/XenForo/DataWriter/User.php
  34. library/XenForo/DataWriter.php
  35. library/Tinhte/XenTag/Listener.php
  36. library/EWRporta/Listener/Init.php
  37. library/EWRporta/Helper/Index.php
  38. library/WidgetFramework/Listener.php
  39. library/WidgetFramework/Option.php
  40. library/Tinhte/AttachImageOptimization/Listener.php
  41. library/XenForo/Router.php
  42. library/XenForo/Route/ResponseSuffix.php
  43. library/XenForo/Route/Interface.php
  44. library/XenForo/Route/Prefix.php
  45. library/WidgetFramework/Route/Filter/PageX.php
  46. library/XenForo/Route/Prefix/Members.php
  47. library/EWRporta/Listener/Route.php
  48. library/XenForo/RouteMatch.php
  49. library/XenForo/ControllerPublic/Member.php
  50. library/XenForo/ControllerPublic/Abstract.php
  51. library/XenForo/Controller.php
  52. library/vtLai/BlockBadWord/Listen.php
  53. library/EWRporta/Listener/Controller.php
  54. library/Dark/PostRating/EventListener.php
  55. library/EWRmedio/Listener/ControllerPublic.php
  56. library/VfcodersHH/Listener/LoadClass.php
  57. library/XenPlaza/XPlimitLink/Listener/Listener.php
  58. library/Borbole/AdminContentProtection/Listener/Listener.php
  59. library/TMS/Listener/Listener.php
  60. library/KingK/BbCodeManager/EventListener/BbCode.php
  61. library/DoublePost/Listener/LoadClassController.php
  62. library/VietXf/MoreThread/Listener.php
  63. library/VfcodersHH/ControllerPublic/Member.php
  64. library/XenForo/Input.php
  65. library/XenForo/Session.php
  66. library/XenForo/Visitor.php
  67. library/XenForo/Model/User.php
  68. library/DoublePost/Listener/LoadClassModel.php
  69. library/HDJuegos/WaterMarkAdd/Listener.php
  70. library/VietXfAdvStats/Listener.php
  71. library/EWRporta/Listener/Model.php
  72. library/InfisJSC/TopicStarter/Listener.php
  73. library/WidgetFramework/XenForo/Model/User.php
  74. library/VietXfAdvStats/XenForo/Model/User.php
  75. library/Dark/PostRating/Model/User.php
  76. library/XenForo/Permission.php
  77. library/XenForo/Phrase.php
  78. library/XenForo/Locale.php
  79. library/Cezz/MobileStyleSwitch/Switch.php
  80. library/XenForo/ControllerResponse/Reroute.php
  81. library/XenForo/ControllerResponse/Abstract.php
  82. library/XenForo/ControllerHelper/UserProfile.php
  83. library/XenForo/ControllerHelper/Abstract.php
  84. library/Dark/PostRating/Model.php
  85. library/XenForo/Model/UserProfile.php
  86. library/XenForo/Model/ProfilePost.php
  87. library/WidgetFramework/XenForo/Model/ProfilePost.php
  88. library/XenForo/Model/UserField.php
  89. library/XenForo/Model/UserIgnore.php
  90. library/XenForo/Model/Conversation.php
  91. library/Dark/PostRating/Model/Conversation.php
  92. library/XenForo/ControllerResponse/View.php
  93. library/XenForo/Helper/Cookie.php
  94. library/XenForo/ViewRenderer/HtmlPublic.php
  95. library/XenForo/ViewRenderer/Abstract.php
  96. library/XenForo/Template/Public.php
  97. library/XenForo/Template/Abstract.php
  98. library/WidgetFramework/Core.php
  99. library/XenForo/Model/Moderator.php
  100. library/Dark/TaigaChat/EventListener/Listener.php
  101. library/WidgetFramework/Model/Widget.php
  102. library/WidgetFramework/Helper/Sort.php
  103. library/WidgetFramework/WidgetRenderer.php
  104. library/Dark/AzuCloud/EventListener/FrontControllerPreView.php
  105. library/Dark/AzuCloud/Model/Nakano.php
  106. library/XenForo/ViewPublic/Member/View.php
  107. library/XenForo/ViewPublic/Base.php
  108. library/XenForo/View.php
  109. library/EWRporta/Listener/ViewPublic.php
  110. library/WidgetFramework/XenForo/View1.php
  111. library/XenForo/BbCode/Parser.php
  112. library/XenForo/BbCode/Formatter/Base.php
  113. library/EWRmedio/Listener/BbCode.php
  114. library/EWRporta/Listener/BbCode.php
  115. library/DoublePost/Listener/LoadClassbbCode.php
  116. library/Tinhte/AttachImageOptimization/BbCode/Formatter/Base.php
  117. library/EWRmedio/BbCode/Formatter.php
  118. library/VfcodersHH/BbCode/Formatter/Base.php
  119. library/EWRporta/BbCode/Formatter.php
  120. library/Tinhte/XenTag/XenForo/BbCode/Formatter/Base.php
  121. library/DoublePost/BbCode/Formatter/Base.php
  122. library/WidgetFramework/XenForo/BbCode/Formatter/Base.php
  123. library/KingK/BbCodeManager/BbCode/Formatter/Base.php
  124. library/VfcodersHH/Helper/Tags.php
  125. library/KingK/BbCodeManager/Model/CustomBbCode.php
  126. library/XenForo/BbCode/TextWrapper.php
  127. library/xenCODE/MetaKeywords/Listener.php
  128. library/DoublePost/Listener/Hook.php
  129. library/KingK/BbCodeManager/EventListener/Templates/Preloader.php
  130. library/VietXfAdvStats/Model/GetUserGroup.php
  131. library/EWRporta/Route/Index.php
  132. library/XenForo/Route/BuilderInterface.php
  133. library/EWRporta/Listener/NavTabs.php
  134. library/Dark/TaigaChat/EventListener/NavigationTabs.php
  135. library/EWRmedio/Listener/NavTabs.php
  136. library/EWRmedio/Model/Perms.php
  137. library/WidgetFramework/Template/Extended.php
  138. library/KingK/BbCodeManager/EventListener/Templates/InitEditorGrid.php
  139. library/Dark/AzuCloud/EventListener/TemplateHook.php
  140. library/EWRporta/Listener/Template.php
  141. library/EWRmedio/Listener/Template.php
  142. library/EWRmedio/Model/Lists.php
  143. library/VfcodersHH/Listener/Hook.php
  144. library/XenForo/Model/Like.php
  145. library/GFNCoders/UrlRedirector/Listener/Template.php
  146. library/XenForo/Route/Prefix/ProfilePosts.php
  147. library/XenForo/Helper/String.php
  148. library/WidgetFramework/WidgetRenderer/Empty.php
  149. library/XenForo/Helper/Criteria.php
  150. library/XenForo/Debug.php
  151. library/VietXfAdvStats/Option.php
  152. library/XenForo/ViewRenderer/Json.php