What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.

Bug Not a bug Slow query detected: 6.9803 seconds

Alfa1

New Member
The slow query logger finds that with extended cover enabled this pages loads extremely slow while without EC we do not get this error:

Exception: Slow query detected: 6.9803 seconds, /ams/category/news.111/?order=rated - library/SV/SlowQueryLogger/Profiler.php:51
Generated By: Unknown Account, Today at 10:00 AM
Stack Trace
#0 /library/Zend/Db/Statement.php(319): SV_SlowQueryLogger_Profiler->queryEnd(6)
#1 /library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT arti...', Array, 2)
#3 /library/NFLJ/AMS/Model/Article.php(109): XenForo_Model->fetchAllKeyed('\n\t\t\tSELECT arti...', 'article_id')
#4 /library/NFLJ/AMS/ControllerPublic/Category.php(270): NFLJ_AMS_Model_Article->getArticles(Array, Array)
#5 /library/XFA/ExtendedCover/Extends/AMS/ControllerPublic/Category.php(21): NFLJ_AMS_ControllerPublic_Category->actionIndex()
#6 /library/XenForo/FrontController.php(351): XFA_ExtendedCover_Extends_AMS_ControllerPublic_Category->actionIndex()
#7 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(68) "https://forum.com/ams/category/news.111/?order=rated"
["_GET"] => array(1) {
["order"] => string(5) "rated"
}
["_POST"] => array(0) {
}
}
 
Why is Extended Cover loading in AMS while it is disabled for AMS?
I find this problem with threads as well. EC should not be loaded if its disabled for an addon or page.
 
I have look code and i don't know what is the problem

In Controller XFA_ExtendedCover_Extends_AMS_ControllerPublic_Category I call only this method

PHP:
$params = $extendedCoverModelAMSCategory->getCoverParams($response->params['category']['category_id'], $response->params['category']);

And this method call function in Model XFA_ExtendedCover_Model_AMSArticle
In this Model it's check user permission and check if addon is enable in options before make query in DB to get attachments.
And i have implement this behavior in all part of this addon
 
Top