User cannot be updated - mediawiki

I am using MediaWiki and I experience problem changing any user.
When I try to make a change, I got:
MWException from line 3484 of /something//includes/user/User.php: CAS update failed on user_touched.
The version of the user to be saved is older than the current version.
Backtrace:
#0 /something//includes/libs/rdbms/database/Database.php(4461): User->{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
#1 /something//includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)
#2 /something//includes/libs/rdbms/database/DBConnRef.php(641): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#3 /something//includes/user/User.php(3495): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)
#4 /something//includes/preferences/DefaultPreferencesFactory.php(1806): User->saveSettings()
#5 /something//includes/preferences/DefaultPreferencesFactory.php(1853): MediaWiki\Preferences\DefaultPreferencesFactory->saveFormData(array, PreferencesFormOOUI, array)
#6 /something//includes/preferences/DefaultPreferencesFactory.php(1687): MediaWiki\Preferences\DefaultPreferencesFactory->submitForm(array, PreferencesFormOOUI, array)
#7 /something//includes/htmlform/HTMLForm.php(707): MediaWiki\Preferences\DefaultPreferencesFactory->MediaWiki\Preferences\{closure}(array, PreferencesFormOOUI)
#8 /something//includes/htmlform/HTMLForm.php(597): HTMLForm->trySubmit()
#9 /something//includes/htmlform/HTMLForm.php(613): HTMLForm->tryAuthorizedSubmit()
#10 /something//includes/specials/SpecialPreferences.php(102): HTMLForm->show()
#11 /something//includes/specialpage/SpecialPage.php(600): SpecialPreferences->execute(NULL)
#12 /something//includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(NULL)
#13 /something//includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#14 /something//includes/MediaWiki.php(940): MediaWiki->performRequest()
#15 /something//includes/MediaWiki.php(543): MediaWiki->main()
#16 /something//index.php(53): MediaWiki->run()
#17 /something//index.php(46): wfIndexMain()
#18 {main}
Log gives more info (but I dont see anything to worry about):
...
[UserOptionsManager] Loading options from database
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT ##GLOBAL.read_only AS Value
[DBQuery] MediaWiki\User\UserOptionsManager::loadUserOptions [0s] localhost: SELECT up_property,up_value FROM `user_properties` WHERE up_user = 1
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.001s] localhost: SELECT ##GLOBAL.read_only AS Value
[DBQuery] MediaWiki\User\UserGroupManager::getUserGroupMemberships [0s] localhost: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = 1
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT ##GLOBAL.read_only AS Value
[DBQuery] MediaWiki\User\UserGroupManager::getUserGroupMemberships [0s] localhost: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = 1
[Parser] Parser::setOutputFlag: set user-signature flag on 'Special:Preferences'; User signature detected
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.002s] localhost: SELECT ##GLOBAL.read_only AS Value
[preferences] Created form descriptor for user 'Admin'
[memcached] getWithSetCallback(global:rdbms-server-readonly:localhost:DB_NAME:): process cache hit
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.001s] localhost: SELECT ##GLOBAL.read_only AS Value
[DBQuery] startAtomic: entering level 0 (User::saveSettings)
[DBQuery] User::saveSettings [0s] localhost: UPDATE `user` SET user_name = 'Admin',user_real_name = '',user_email = '',user_email_authenticated = NULL,user_touched = '20210217095957',user_token = '0e49ef2817',user_email_token = NULL,user_email_token_expires = NULL WHERE user_id = 1 AND user_touched = '19700101003250'
[preferences] CAS update failed on user_touched for user ID '1' (master read)
[DBQuery] cancelAtomic: canceling level 0 (User::saveSettings)
[DBQuery] MWExceptionHandler::rollbackMasterChangesAndLog [0s] localhost: ROLLBACK
[DBQuery] Wikimedia\Rdbms\Database::ping [0.001s] localhost: SELECT 1 AS ping
Last MediaWiki. I updated it from 1.31 and before I couldn't update users too.
Any ideas, any hints? Anything would be highly appreciated!

Related

Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in zurmo

Every time I try to change role of a active user it throwing following error.
Do anyone know about this error, zurmo support/forum is no longer available.
[22003] - SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`zurmogt`.`campaign_read`.`count` - 1)'
REQUEST_URI=/app/index.php/users/default/edit?id=96
HTTP_REFERER=myurl.com/app/index.php/users/default/edit?id=96
---
2018/04/25 13:26:23 [warning] [application] Exception class: RedBean_Exception_SQL
#0 /home/prod/releases/20170222074235/redbean/rb.php(777): RedBean_Driver_PDO->runQuery('update campaign...', Array)
#1 /home/prod/releases/20170222074235/redbean/rb.php(1779): RedBean_Driver_PDO->Execute('update campaign...', Array)
#2 /home/prod/releases/20170222074235/redbean/rb.php(7534): RedBean_Adapter_DBAdapter->exec('update campaign...', Array)
#3 /home/prod/releases/20170222074235/redbean/rb.php(7440): RedBean_Facade::query('exec', 'update campaign...', Array)
#4 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(962): RedBean_Facade::exec('update campaign...')
#5 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1022): ReadPermissionsOptimizationUtil::decrementCount('campaign_read', 29092, Object(Role))
#6 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1023): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('campaign_read', 29092, Object(Role))
#7 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1023): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('campaign_read', 29092, Object(Role))
#8 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1023): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('campaign_read', 29092, Object(Role))
#9 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1053): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('campaign_read', 29092, Object(Role))
#10 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(824): ReadPermissionsOptimizationUtil::bulkDecrementParentRolesCounts('campaign_read', Array, Object(Role))
#11 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/AllPermissionsOptimizationUtil.php(385): ReadPermissionsOptimizationUtil::userBeingRemovedFromRole(Object(User), Object(Role))
#12 /home/prod/releases/20170222074235/app/protected/modules/users/models/User.php(300): AllPermissionsOptimizationUtil::userBeingRemovedFromRole(Object(User), Object(Role))
#13 /home/prod/releases/20170222074235/app/protected/core/models/RedBeanModel.php(1909): User->beforeSave()
#14 /home/prod/releases/20170222074235/app/protected/modules/zurmo/models/Item.php(123): RedBeanModel->save(false, NULL)
#15 /home/prod/releases/20170222074235/app/protected/modules/users/models/User.php(244): Item->save(false, NULL)
#16 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(159): User->save(false)
#17 /home/prod/releases/20170222074235/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(109): ZurmoControllerUtil->saveModelFromSanitizedData(Array, Object(User), false, 'Lora Chandra', false)
#18 /home/prod/releases/20170222074235/app/protected/modules/users/controllers/DefaultController.php(326): ZurmoControllerUtil->saveModelFromPost(Array, Object(User), false, 'Lora Chandra')
#19 /home/prod/releases/20170222074235/app/protected/modules/users/controllers/DefaultController.php(244): UsersDefaultController->attemptToSaveModelFromPost(Object(User), NULL)
#20 [internal function]: UsersDefaultController->actionEdit('96')
#21 /home/prod/releases/20170222074235/yii/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(UsersDefaultController), Array)
#22 /home/prod/releases/20170222074235/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(UsersDefaultController), Object(ReflectionMethod), Array)
#23 /home/prod/releases/20170222074235/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#24 /home/prod/releases/20170222074235/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#25 /home/prod/releases/20170222074235/yii/framework/web/CController.php(291): CFilterChain->run()
#26 /home/prod/releases/20170222074235/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#27 /home/prod/releases/20170222074235/yii/framework/web/CWebApplication.php(282): CController->run('edit')
#28 /home/prod/releases/20170222074235/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('users/default/e...')
#29 /home/prod/releases/20170222074235/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#30 /home/prod/releases/20170222074235/app/protected/core/components/WebApplication.php(88): CApplication->run()
#31 /home/prod/releases/20170222074235/app/index.php(73): WebApplication->run()
#32 {main}

MySQL slave database stopped replication."Last_Error: Error 'Unknown database 'sen'' on query. Default"

the master:
the slave:
Current Environment
sen#ubuntu:~$ uname -a
Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
sen#ubuntu:~$ mysql -V
mysql Ver 14.14 Distrib 5.5.32, for Linux (x86_64) using readline 5.1
Current Status
Master, 3306:
my.cnf : https://www.dropbox.com/s/nmelrjhrp6wn2oj/my_3306.cnf?dl=0
show processlist:
Master has sent all binlog to slave; waiting for binlog to be updated
sen#ubuntu:/data/3306$ sudo /application/mysql/bin/mysqlbinlog mysql-bin.000007
[sudo] password for sen:
/*!50530 SET ##SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET ##session.max_insert_delayed_threads=0*/;
/*!50003 SET #OLD_COMPLETION_TYPE=##COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
# #161106 10:39:40 server id 1 end_log_pos 107 Start: binlog v 4, server
# v 5.5.32-log created 161106 10:39:40 at startup
# # Warning: this binlog is either in use or was not closed properly.
# ROLLBACK/*!*/;
# BINLOG '
# 7JceWA8BAAAAZwAAAGsAAAABAAQANS41LjMyLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
# AAAAAAAAAAAAAAAAAADslx5YEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
# '/*!*/;
# DELIMITER ;
# # End of log file
# ROLLBACK /* added by mysqlbinlog */;
# /*!50003 SET COMPLETION_TYPE=#OLD_COMPLETION_TYPE*/;
# /*!50530 SET ##SESSION.PSEUDO_SLAVE_MODE=0*/;
#
Slave,3307:
my.cnf : https://www.dropbox.com/s/5t6mruzuo3wo1l7/my_3307.cnf?dl=0
show processlist: Waiting for master to send event
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.80.2
Master_User: rep
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000007
Read_Master_Log_Pos: 107
Relay_Log_File: relay-bin.000011
Relay_Log_Pos: 253
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB: mysql
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1049
Last_Error: Error 'Unknown database 'sen'' on query. Default
database: 'sen'. Query: 'create table t(id int(11), primary key(id))'
Skip_Counter: 0
Exec_Master_Log_Pos: 107
Relay_Log_Space: 2873
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1049
Last_SQL_Error: Error 'Unknown database 'sen'' on query. Default
database: 'sen'. Query: 'create table t(id int(11), primary key(id))'
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.00 sec)
ERROR:
No query specified
the relay bin log:
sen#ubuntu:/data/3307$ sudo /application/mysql/bin/mysqlbinlog relay-bin.000020
/*!50530 SET ##SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET ##session.max_insert_delayed_threads=0*/;
/*!50003 SET #OLD_COMPLETION_TYPE=##COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
# #161106 17:00:43 server id 2 end_log_pos 107 Start: binlog v 4, server
# v 5.5.32 created 161106 17:00:43
# BINLOG '
# O/EeWA8CAAAAZwAAAGsAAAAAAAQANS41LjMyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
# AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
# '/*!*/;
# # at 107
# #700101 8:00:00 server id 1 end_log_pos 0 Rotate to mysql-bin.000007
# pos: 107
# # at 150
# #161106 10:39:40 server id 1 end_log_pos 0 Start: binlog v 4, server
# v 5.5.32-log created 161106 10:39:40
# BINLOG '
# 7JceWA8BAAAAZwAAAAAAAAAAAAQANS41LjMyLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
# AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
# '/*!*/;
# DELIMITER ;
# # End of log file
# ROLLBACK /* added by mysqlbinlog */;
# /*!50003 SET COMPLETION_TYPE=#OLD_COMPLETION_TYPE*/;
# /*!50530 SET ##SESSION.PSEUDO_SLAVE_MODE=0*/;
#
the error log:
$ less -R mysql_3307.err
161105 19:39:04 InnoDB: Waiting for the background threads to start
161105 19:39:05 InnoDB: 5.5.32 started; log sequence number 1601853
161105 19:39:05 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3307
161105 19:39:05 [Note] - '0.0.0.0' resolves to '0.0.0.0';
161105 19:39:05 [Note] Server socket created on IP: '0.0.0.0'.
161105 19:39:05 [Warning] 'user' entry 'root#ubuntu' ignored in --skip-name-resolve mode.
161105 19:39:05 [Warning] 'user' entry '#ubuntu' ignored in --skip-name-resolve mode.
161105 19:39:05 [Warning] 'proxies_priv' entry '# root#ubuntu' ignored in --skip-name-resolve mode.
161105 19:39:05 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000003' at position 107, relay log '/data/3307/relay-bin.000011' position: 253
161105 19:39:05 [ERROR] Slave I/O: error connecting to master 'rep#192.168.80.2:3306' - retry-time: 60 retries: 86400, Error_code: 2003
161105 19:39:05 [ERROR] Slave SQL: Error 'Unknown database 'sen'' on query. Default database: 'sen'. Query: 'create table t(id int(11), primary key(id))', Error_code: 1049
161105 19:39:05 [Warning] Slave: Unknown database 'sen' Error_code: 1049
161105 19:39:05 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000003' position 107
161105 19:39:05 [Note] Event Scheduler: Loaded 0 events
161105 19:39:05 [Note] /application/mysql-5.5.32/bin/mysqld: ready for connections. Version: '5.5.32' socket: '/data/3307/mysql.sock' port: 3307 Source distribution
161105 19:40:05 [Note] Slave I/O thread: connected to master 'rep#192.168.80.2:3306',replication started in log 'mysql-bin.000004' at position 317
I have searched by google, found
https://bugs.mysql.com/bug.php?id=19344
I have done
1.
restart the two mysql process 3306 and 3307
2.
on slave database:
stop slave;
start slave;
But it doesn't work.(mei shen me luan yong)
Please do me a favor!
tks.
by sen.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fototekn_digi.ln_filter' doesn't exist

Why I am getting the following MySQL error?
SQLSTATE[42S02 Base table or view not found: 1146 Table 'fototekn_digi.ln_filter' doesn't exist, query was: SELECT COUNT(*) FROM `ln_filter` AS `main_table` WHERE (attribute_code = 'price')";
0 /chroot/home/fototekn/fototeknoloji.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
1 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
2 /chroot/home/fototekn/fototeknoloji.com/html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
3 /chroot/home/fototekn/fototeknoloji.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
4 /chroot/home/fototekn/fototeknoloji.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
5 /chroot/home/fototekn/fototeknoloji.com/html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
6 /chroot/home/fototekn/fototeknoloji.com/html/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
7 /chroot/home/fototekn/fototeknoloji.com/html/app/code/local/EM/LayeredNavigation/Block/Adminhtml/Filter/Grid.php(20): Varien_Data_Collection_Db->getSize()
8 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(626): EM_LayeredNavigation_Block_Adminhtml_Filter_Grid->_prepareCollection()
9 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
10 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(929): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
11 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(648): Mage_Core_Block_Abstract->toHtml()
12 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(592): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
13 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
14 /chroot/home/fototekn/fototeknoloji.com/html/app/design/adminhtml/default/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
15 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(241): include('/chroot/home/fo...')
16 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
17 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
18 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
19 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
20 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(930): Mage_Adminhtml_Block_Widget_Container->_toHtml()
21 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
22 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(930): Mage_Core_Block_Text_List->_toHtml()
23 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(648): Mage_Core_Block_Abstract->toHtml()
24 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(592): Mage_Core_Block_Abstract->_getChildHtml('content', true)
25 /chroot/home/fototekn/fototeknoloji.com/html/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
26 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(241): include('/chroot/home/fo...')
27 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
28 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
29 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
30 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Block/Abstract.php(930): Mage_Adminhtml_Block_Template->_toHtml()
31 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
32 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
33 /chroot/home/fototekn/fototeknoloji.com/html/app/code/local/EM/LayeredNavigation/controllers/Adminhtml/FilterController.php(12): Mage_Core_Controller_Varien_Action->renderLayout()
34 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): EM_LayeredNavigation_Adminhtml_FilterController->indexAction()
35 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
36 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
37 /chroot/home/fototekn/fototeknoloji.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
38 /chroot/home/fototekn/fototeknoloji.com/html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
39 /chroot/home/fototekn/fototeknoloji.com/html/index.php(80): Mage::run('', 'store')
40 {main}";s:3:"url";s:80:"/index.php/layernav/adminhtml_filter/index/key/1f03428d4c76b6a6754acb3d90df4119/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
As the error message says, you're getting the error because the table fototekn_digi.ln_filter does not exist.
The original query that caused that error was:
SELECT COUNT(*) FROM `ln_filter` AS `main_table` WHERE (attribute_code = 'price')";
It would seem that somehow the ln_filter table is resolving to a full name of fototekn_digi.ln_filter, and that no table exists by that fully qualified name.
If you would like more help with this issue, I would suggest providing some or all of the following:
What steps have you tried to resolve the error or deduce its origin?
How is this error being produced? What code is causing the error?
Do you expect a table named ln_filter to exist?

Magento order by newest breaks the site

When I use the dropdown and select sort by "New Products" which is:
?dir=asc&limit=8&order=newest, the site gives the usual:
"There has been an error processing your request
Exception printing is disabled by default for security reasons."
The report contains this:
a:5:{i:0;s:864:"SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price` FROM `mage_catalog_product_entity` AS `e`
INNER JOIN `mage_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '13' AND cat_index.is_parent=1
INNER JOIN `mage_catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 ORDER BY `FIElD(e`.`entity_id, -1) DESC, created_at` DESC LIMIT 10
";i:1;s:5523:"#0 /home/mexicanos/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/mexicanos/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/mexicanos/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/mexicanos/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `e`.*, `...', Array)
#4 /home/mexicanos/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `e`.*, `...', Array)
#5 /home/mexicanos/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `e`.*, `...', Array)
#6 /home/mexicanos/public_html/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT `e`.*, `...', Array)
#7 /home/mexicanos/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1045): Varien_Data_Collection_Db->_fetchAll('SELECT `e`.*, `...')
#8 /home/mexicanos/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /home/mexicanos/public_html/app/code/core/Mage/Review/Model/Observer.php(78): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10 /home/mexicanos/public_html/app/code/core/Mage/Core/Model/App.php(1338): Mage_Review_Model_Observer->catalogBlockProductCollectionBeforeToHtml(Object(Varien_Event_Observer))
#11 /home/mexicanos/public_html/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Review_Model_Observer), 'catalogBlockPro...', Object(Varien_Event_Observer))
#12 /home/mexicanos/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_block_p...', Array)
#13 /home/mexicanos/public_html/app/code/core/Mage/Catalog/Block/Product/List.php(164): Mage::dispatchEvent('catalog_block_p...', Array)
#14 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Catalog_Block_Product_List->_beforeToHtml()
#15 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#16 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('product_list', true)
#17 /home/mexicanos/public_html/app/code/core/Mage/Catalog/Block/Category/View.php(90): Mage_Core_Block_Abstract->getChildHtml('product_list')
#18 /home/mexicanos/public_html/app/design/frontend/base/default/template/catalog/category/view.phtml(70): Mage_Catalog_Block_Category_View->getProductListHtml()
#19 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mexica...')
#20 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#21 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#23 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#24 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#25 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#26 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#27 /home/mexicanos/public_html/app/design/frontend/mexicanos/default/template/page/2columns-left.phtml(57): Mage_Core_Block_Abstract->getChildHtml('content')
#28 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mexica...')
#29 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/mexica...')
#30 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#31 /home/mexicanos/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#32 /home/mexicanos/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#33 /home/mexicanos/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#34 /home/mexicanos/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(161): Mage_Core_Controller_Varien_Action->renderLayout()
#35 /home/mexicanos/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
#36 /home/mexicanos/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#37 /home/mexicanos/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#38 /home/mexicanos/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#39 /home/mexicanos/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#40 /home/mexicanos/public_html/index.php(87): Mage::run('', 'store')
#41 {main}";s:3:"url";s:36:"/food/raw.html?dir=asc&order=newest";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
but if I order using any other option like by price, position, name it works. I've already spent 2 hours searching for a solution, nothing seems to work: I cleared cache, restored old database and still no success and I don't understand why only that option doesn't work. Any help would be appreciated. Thank you!
I checked your report in it Query, check back quote(`) given in the query in
**ORDER BY FIELD(`e`.`entity_id`, -1) DESC, `created_at` DESC LIMIT 10**
Seem you modify Magento or some plugin so I don't know exactly how to resolve it. But in query ' FIElD(e.entity_id, -1) DESC, created_at' this segment is wrong.
Please search this text FIElD(e.entity_id, -1) and remove it. Or simpler, you can rollback everything and try this solution if you want to sort product by newest
http://magebase.com/magento-tutorials/magento-sort-by-newest-products-made-easy/
Try this extension http://www.magentocommerce.com/magento-connect/sort-by-date.html. This may help you.
Or you can do it using "created_at" attribute.
http://yourdomain.com/category/sort-by/created_at/sort-direction/asc.html

Magento 1.8.0 THERE HAS BEEN AN ERROR PROCESSING YOUR REQUEST

I have two exactly same sites, one is on local machine and one is live. When I'm trying to get best products into right sidebar the one that is on local machine is working fine but the live site throws the following error
a:5:{i:0;s:2382:"SELECT SUM(order_items.qty_ordered) AS `ordered_qty`, `order_items`.`name` AS `order_items_name`, `order_items`.`product_id` AS `entity_id`, `e`.`entity_type_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`sku`, `e`.`has_options`, `e`.`required_options`, `e`.`created_at`, `e`.`updated_at`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`cost`, `e`.`created_at`, `e`.`enable_googlecheckout`, `e`.`gift_message_available`, `e`.`has_options`, `e`.`image_label`, `e`.`is_imported`, `e`.`is_recurring`, `e`.`links_exist`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`recurring_profile`, `e`.`required_options`, `e`.`shipment_type`, `e`.`short_description`, `e`.`sku`, `e`.`sku_type`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`visibility`, `e`.`weight`, `e`.`weight_type`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`msrp_enabled`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `e`.`name`, `e`.`price`, `e`.`small_image`, `cat_index`.`position` AS `cat_index_position` FROM `sales_flat_order_item` AS `order_items`
INNER JOIN `sales_flat_order` AS `order` ON `order`.entity_id = order_items.order_id AND `order`.state 'canceled'
LEFT JOIN `catalog_product_entity` AS `e` ON (e.type_id NOT IN ('grouped', 'configurable', 'bundle')) AND e.entity_id = order_items.product_id AND e.entity_type_id = 4
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2' WHERE (parent_item_id IS NULL) GROUP BY `order_items`.`product_id` HAVING (SUM(order_items.qty_ordered) > 0) ORDER BY `ordered_qty` desc LIMIT 9
";i:1;s:5232:"#0 /var/www/vhosts/.../httpdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/.../httpdocs/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT SUM(orde...', Array)
#4 /var/www/vhosts/.../httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT SUM(orde...', Array)
#5 /var/www/vhosts/.../httpdocs/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query('SELECT SUM(orde...', Array)
#6 /var/www/vhosts/.../httpdocs/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT SUM(orde...', Array)
#7 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1047): Varien_Data_Collection_Db->_fetchAll('SELECT SUM(orde...')
#8 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /var/www/vhosts/.../httpdocs/lib/Varien/Data/Collection.php(752): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10/var/www/vhosts/.../httpdocs/app/design/frontend/default/ma_pharmacy/template/magentothem/bestsellerproductvertscroller/bestsellerright.phtml(42): Varien_Data_Collection->count()
#11 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#12 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886): Mage_Core_Block_Template->_toHtml()
#15 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#16 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886): Mage_Core_Block_Text_List->_toHtml()
#17 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(605): Mage_Core_Block_Abstract->toHtml()
#18 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(549): Mage_Core_Block_Abstract->_getChildHtml('right', true)
#19 /var/www/vhosts/.../httpdocs/app/design/frontend/default/ma_pharmacy/template/page/2columns-right.phtml(59): Mage_Core_Block_Abstract->getChildHtml('right')
#20 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#21 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#22 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#23 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Block/Abstract.php(886): Mage_Core_Block_Template->_toHtml()
#24 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#25 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#26 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#27 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#28 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#29 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#30/var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#31 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#32 /var/www/vhosts/.../httpdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#33 /var/www/vhosts/.../httpdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#34 /var/www/vhosts/.../httpdocs/index.php(87): Mage::run('', 'store')
#35 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
I don't quite understand where is the problem. Would appreciate some help, where should I look.
Thanks a lot.
use this steps
system->config->catalog->frontend
set Use Flat Catalog Category, Use Flat Catalog Product both to no.
It works for me.
As I said above the issue was in ->addOrderedQty() and ->setOrder('ordered_qty', 'desc') the fix can be found here Magento 1.7 sorting by ordered quantity - bestseller products issues