Sub-accounts by Waindigo [Deleted]

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Column 'like_count' in field list is ambiguous - library/Zend/Db/Statement/Mysqli.php:77

Trase:
#0 /srv/www/vhosts/tes-minecraft.ru/community/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????SELECT user...')
#1 /srv/www/vhosts/tes-minecraft.ru/community/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????SELECT user...')
#2 /srv/www/vhosts/tes-minecraft.ru/community/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????SELECT user...')
#3 /srv/www/vhosts/tes-minecraft.ru/community/library/Zend/Db/Adapter/Abstract.php(753): Zend_Db_Adapter_Abstract->query('????SELECT user...', 274)
#4 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Model/User.php(397): Zend_Db_Adapter_Abstract->fetchRow('????SELECT user...', 274)
#5 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Model/User.php(883): XenForo_Model_User->getUserById(274, Array)
#6 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Visitor.php(407): XenForo_Model_User->getVisitingUserById(274)
#7 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Session.php(270): XenForo_Visitor::setup(274, Array)
#8 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Controller.php(291): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#9 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/Controller.php(304): XenForo_Controller->_setupSession('List')
#10 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/FrontController.php(336): XenForo_Controller->preDispatch('List', 'Dark_TaigaChat_...')
#11 /srv/www/vhosts/tes-minecraft.ru/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /srv/www/vhosts/tes-minecraft.ru/community/index.php(13): XenForo_FrontController->run()
#13 {main}

Request:

array(3) {
["url"] => string(53) "http://tes-minecraft.ru/community/taigachat/list.json"
["_GET"] => array(0) {
}
["_POST"] => array(6) {
["sidebar"] => string(1) "1"
["lastrefresh"] => string(4) "8952"
["_xfRequestUri"] => string(11) "/community/"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}

Crashes after enabling this add-on.
 
The bug is with the Taiga Chat add-on, not this one.

@Luke Foreman, you need to specify the name of the table (i.e., user.like_count, not just like_count) when you are extending the User model.
 
I've been noticing that some of the subaccount counts are incorrect on the parent profile.

For example: http://pandorarp.com/members/ariah.221/

This member has only 8 subaccounts (I've renamed them to 'characters' on my forum). But the count in the box says she has 12. I suspect it's due to subaccounts that were deleted, but they're still being included in the overall count.
 
From the error, it sounds like it is conflicting with an add-on that has something to do with likes.

Perhaps this one:
Post Ratings - taking likes to the next level

I don't have a copy of that add-on so can't confirm, but it would be up to @Luke Foreman to fix if it is that add-on.


That is the problem precisely. It is the Luke Foreman Post ratings add-on that's conflicting with your sub-account add-on. I received an identical error message, whitepage with mysqli errors. That's the trouble with heavy modding, Too many chefs.
 
That is the problem precisely. It is the Luke Foreman Post ratings add-on that's conflicting with your sub-account add-on. I received an identical error message, whitepage with mysqli errors. That's the trouble with heavy modding, Too many chefs.
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Column 'like_count' in field list is ambiguous - library/Zend/Db/Statement/Mysqli.php:77

Trase:


Request:



Crashes after enabling this add-on.


I fixed this by going into library/Dark/PostRating/Model/user.php and changing like_count to user.like_count @ l59
 
Error Info
ErrorException: Undefined index: parent_subaccount_user_ids - library/Waindigo/SubAccounts/Extend/XenForo/Model/User.php:195
Generated By: Unknown Account, Today at 9:58 AM
Stack Trace
#0 /library/Waindigo/SubAccounts/Extend/XenForo/Model/User.php(195): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxx/...', 195, Array)
#1 /library/Waindigo/PostAsUser/Listener/TemplatePostRender.php(26): Waindigo_SubAccounts_Extend_XenForo_Model_User->canPostAsDifferentUsers()
#2 [internal function]: Waindigo_PostAsUser_Listener_TemplatePostRender->_threadView('thread_view', Object(Waindigo_PostAsUser_Listener_TemplatePostRender))
#3 /library/Waindigo/Listener/TemplatePostRender/20130522.php(100): call_user_func_array(Array, Array)
#4 /library/Waindigo/Listener/TemplatePostRender/20130522.php(53): Waindigo_Listener_TemplatePostRender->_runTemplateCallback(Array)
#5 /library/Waindigo/PostAsUser/Listener/TemplatePostRender.php(18): Waindigo_Listener_TemplatePostRender->run()
#6 [internal function]: Waindigo_PostAsUser_Listener_TemplatePostRender::templatePostRender('thread_view', '???????????????...', Array, Object(XenForo_Template_Public))
#7 /library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#8 /library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'thread_view')
#9 /library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#10 /library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#11 /library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#12 /library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#13 /index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array(3) {
["url"] => string(55) "http://xxx/threads/pictures-pictures.8/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
There seems to be a conflict with another add-on here. Have you tried disabling other add-ons to test this?
 
I just bought XenForo yesterday - in large part to use this plugin for my role-playing site. I'm a complete XenForo newbie, so please bear with me.

As a test, I sent out a number of requests from my main account to link a few of my sub-accounts. Rather than log in as each sub-account to confirm the requests, is there a MySQL query or database field I can change to approve all pending account requests? I'll need to set up several other users, so this will make my life a lot easier.

Also, is there a method for the admin to link and/or create new sub-accounts for the users? If not, I'm interested in contributing to have this feature added.
 
I just bought XenForo yesterday - in large part to use this plugin for my role-playing site. I'm a complete XenForo newbie, so please bear with me.

As a test, I sent out a number of requests from my main account to link a few of my sub-accounts. Rather than log in as each sub-account to confirm the requests, is there a MySQL query or database field I can change to approve all pending account requests? I'll need to set up several other users, so this will make my life a lot easier.
PHP:
UPDATE xf_user SET subaccount_parent_state = 'enabled' WHERE subaccount_parent_state != 'disabled'
However, I think this does not update the parent cache, so some things might not work as expected. I might be able to create a cache rebuilder for this, but there is no quick query that you can run that will fix this.

Also, is there a method for the admin to link and/or create new sub-accounts for the users? If not, I'm interested in contributing to have this feature added.
No, there is no such feature. Although, you could try using the Login As User by Waindigo add-on. Otherwise, please PM me to discuss contributing.

Is it possible to create a subaccount from an existing account?
Yes.
 
Thanks for your quick response! :) It sounds like your "Login as User" add-on is my best option for now.

As I mentioned, I'm using this for a role-playing site. Here's what I'm trying to do:

- Users can create sub-accounts for their characters
- Users can switch between their sub accounts and main account without needing to log in again - Preferably through a drop-down menu
- Users cannot switch between (or otherwise access) the accounts belonging to other users if their account is not linked

I currently have these add-ons installed:

- Sub-accounts by Waindigo 1.0.0
- Post As User by Waindigo 1.0.4
- Login As User by Waindigo 1.1.7a


When I'm logged in on one of my sub-accounts, (a "registered" member with no admin privileges) I see the option to switch to any of the other accounts on my system. Is there any way to restrict the drop-down so it only lists accounts that the user has confirmed s/he has permission to access?
 
There is a permission 'Log in as a different user' which you can set to allow or disallow users to login as any user. If they don't have that permission, they will only be able to log in as one of their sub-accounts.

If you are having trouble with this, please check some of the posts in the Login As User thread, which should be able to help you.
 
Error Info
ErrorException: Undefined index: parent_subaccount_user_ids - library/Waindigo/SubAccounts/Extend/XenForo/Model/User.php:195
Generated By: Unknown Account, Today at 9:58 AM
Stack Trace
#0 /library/Waindigo/SubAccounts/Extend/XenForo/Model/User.php(195): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxx/...', 195, Array)
#1 /library/Waindigo/PostAsUser/Listener/TemplatePostRender.php(26): Waindigo_SubAccounts_Extend_XenForo_Model_User->canPostAsDifferentUsers()
#2 [internal function]: Waindigo_PostAsUser_Listener_TemplatePostRender->_threadView('thread_view', Object(Waindigo_PostAsUser_Listener_TemplatePostRender))
#3 /library/Waindigo/Listener/TemplatePostRender/20130522.php(100): call_user_func_array(Array, Array)
#4 /library/Waindigo/Listener/TemplatePostRender/20130522.php(53): Waindigo_Listener_TemplatePostRender->_runTemplateCallback(Array)
#5 /library/Waindigo/PostAsUser/Listener/TemplatePostRender.php(18): Waindigo_Listener_TemplatePostRender->run()
#6 [internal function]: Waindigo_PostAsUser_Listener_TemplatePostRender::templatePostRender('thread_view', '???????????????...', Array, Object(XenForo_Template_Public))
#7 /library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#8 /library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'thread_view')
#9 /library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#10 /library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#11 /library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#12 /library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#13 /index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array(3) {
["url"] => string(55) "http://xxx/threads/pictures-pictures.8/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

I'm having this exact same error. The only other add-on I had installed was XenPorta. I disabled it, clicked around a bit, and so far, no more errors.

Do you also have XenPorta installed?

***EDIT****

It looks like I was wrong. I just checked again, and am still experiencing these errors with XenPorta disabled.
 
Last edited:
Have you tried disabling other add-ons? I need to know which add-on it conflicts with or how to replicate the error with no add-ons installed.
 
Yes. I disabled all add-ons except these:

- Sub-accounts by Waindigo 1.0.0
- Post As User by Waindigo 1.0.4
- Login As User by Waindigo 1.1.7a

I have a fresh install with the XenPorta add-on installed, but disabled. I also did a test import of some of the data from an old site. I see these errors while testing out the site.

We have some new data on the old site that I need to import, so I'll probably uninstall and reinstall later today. If it makes tracking down the errors easier, I can give you login info beforehand. Please just let me know and I'll PM it to you.
 
Top Bottom