Sub-accounts by Waindigo [Deleted]

Help me Please @Waindigo !!! My Forum is down!!

Server Error
Mysqli prepare error: Column 'like_count' in field list is ambiguous
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/User.php at line 427
  6. XenForo_Model_User->getUserById() in XenForo/Model/User.php at line 913
  7. XenForo_Model_User->getVisitingUserById() in XenForo/Visitor.php at line 407
  8. XenForo_Visitor::setup() in XenForo/Session.php at line 370
  9. XenForo_Session::startAdminSession() in XenForo/ControllerAdmin/Abstract.php at line 48
  10. XenForo_ControllerAdmin_Abstract->_setupSession() in XenForo/Controller.php at line 304
  11. XenForo_Controller->preDispatch() in XenForo/FrontController.php at line 346
  12. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  13. XenForo_FrontController->run() in /www///admin.php at line 13

fix: http://xenforo.com/community/threads/sub-accounts-by-waindigo.57242/page-3#post-675048
You are aware that the fix that you linked to is in reference to and answered in this earlier post:
http://xenforo.com/community/threads/sub-accounts-by-waindigo.57242/page-3#post-650556
The error above is not related to this add-on; Sub-accounts by Waindigo doesn't even contain the code 'like_count'. It may not be the Taiga Chat add-on in this instance but something is extending XenForo_Model_User incorrectly, unfortunately the error posted above doesn't point to a distinct add-on so I can't tell what your problem is without further information.
 
Last edited:
What I'm looking for - forgive me if it's been asked, I might have missed it - is the ability to have my users select from a drop down of their sub-accounts when they login and have that be compatible with the Ajax Chat integration. I'm afraid of using the 'log-in as user' because I don't want users to login as any other account but their primary and their sub-account and this seems to give the option to login as any user at all unless I'm reading it wrong.

Is it also possible to have each sub-account have custom profile fields and other info attached to it? As well, I cannot sort out how a user switches between their primary account and their sub-account :(

If you DM me I'd be happy to discuss a donation for any work done.

Thanks!
 
Last edited:
Hi Jon,

I have your "login as user" and "sub-accounts" add-ons installed. I just upgraded the sub-accounts add-on, and now users are receiving this error whenever they try to reply to a thread or post a new thread in the forums:

The following error occurred:
A server error occurred. Please try again later.

My error log (in the xenForo admin panel) says this:

Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'original_creator_waindigo' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, 12 minutes ago
Stack Trace
#0 /home/account/public_html/mysite.com/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/account/public_html/mysite.com/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/account/public_html/mysite.com/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/account/public_html/mysite.com/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('xf_thread', Array)
#4 /home/account/public_html/mysite.com/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#5 /home/account/public_html/mysite.com/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#6 /home/account/public_html/mysite.com/library/XenForo/Model/Feed.php(495): XenForo_DataWriter->save()
#7 /home/account/public_html/mysite.com/library/XenForo/Model/Feed.php(536): XenForo_Model_Feed->_insertFeedEntry(Array, Array, Array)
#8 /home/account/public_html/mysite.com/library/XenForo/Model/Feed.php(563): XenForo_Model_Feed->_insertFeedData(Array, Array)
#9 /home/account/public_html/mysite.com/library/XenForo/Model/Feed.php(588): XenForo_Model_Feed->importFeedData(Array)
#10 /home/account/public_html/mysite.com/library/XenForo/CronEntry/Feeder.php(15): XenForo_Model_Feed->scheduledImportTimeLimited(15)
#11 [internal function]: XenForo_CronEntry_Feeder::importFeeds(Array)
#12 /home/account/public_html/mysite.com/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)
#13 /home/account/public_html/mysite.com/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#14 /home/account/public_html/mysite.com/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_Cron->execute(Array, Array, 7.9999980926514, '')
#15 /home/account/public_html/mysite.com/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999980926514, '', false)
#16 /home/account/public_html/mysite.com/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#17 /home/account/public_html/mysite.com/deferred.php(23): XenForo_Model_Deferred->run(false)
#18 {main}
Request State
array(3) {
["url"] => string(31) "http://mysite.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(10) "/admin.php"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}

Can you please help me find a fix for this issue? As I said above, nobody is able to post on my site at the moment, so any help is greatly appreciated!
 
Last edited:
Hi Jon,

I have your "login as user" and "sub-accounts" add-ons installed. I just upgraded the sub-accounts add-on, and now users are receiving this error whenever they try to reply to a thread or post a new thread in the forums:

My error log (in the xenForo admin panel) says this:

Can you please help me find a fix for this issue? As I said above, nobody is able to post on my site at the moment, so any help is greatly appreciated!
I've released an update for this.

Can sub-accounts also inherit moderator permissions from the parent account?
Only user group permissions are inherited.
 
Hi @Waindigo. I've just updated to version 1.0.4 and found an odd issue with my subaccounts.

I have not activated the subaccount parent inheritance feature. However, when I rebuilt the user cache, any subaccounts of administrators had their names styled like the administrator account. Our admin names are red and our other usergroups are a variety of other colors. However, all subaccounts of admins had their names turn the admin red. This did not happen with subaccounts of other member groups.

Possibly related, but I have the following code in my templates to add usergroup images beneath each user.
Code:
    <xen:if is="{xen:helper ismemberof, $user, 3}">
                            <img src="styles/jagger/groupimages/admin_icon.png" />
                        <xen:elseif is="{xen:helper ismemberof, $user, 8}" />
                            <img src="styles/jagger/groupimages/ooc_icon.png" />
                        <xen:elseif is="{xen:helper ismemberof, $user, 13}" />
                            <img src="styles/jagger/groupimages/user_Horizon.png" />
                        <xen:elseif is="{xen:helper ismemberof, $user, 12}" />
                            <img src="styles/jagger/groupimages/user_Morhall.png" />
                    <xen:elseif is="{xen:helper ismemberof, $user, 11}" />
                            <img src="styles/jagger/groupimages/user_MistyHollow.png" />
                        <xen:elseif is="{xen:helper ismemberof, $user, 5}" />
                            <img src="styles/jagger/groupimages/user_Vagabond.png" />
                    <xen:elseif is="{xen:helper ismemberof, $user, 2}" />
                            <img src="styles/jagger/groupimages/visitor_icon.png" />
                    </xen:if>
After I rebuilt the user cache, all subaccounts were pulling in either "ooc_icon.png" or "admin_icon.png", which matched the usergroup of their parent account. I checked the subaccounts and they were not assigned to the admin or ooc group.

I fixed that by reordering the if statement, but it was an odd occurrence.

Did you find the correct conditional, or whatever it may be to fix this?

I have:
Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
    <div class="backImg2">
<xen:elseif is="{xen:helper ismemberof, $user, 7} "/>
   <div class="backImg3">
<xen:elseif is="{xen:helper ismemberof, $user, 8} "/>
    <div class="backImg4">
<xen:elseif is="{xen:helper ismemberof, $user, 9} "/>
    <div class="backImg6">
<xen:elseif is="{xen:helper ismemberof, $user, 10} "/>
    <div class="backImg5">
<xen:elseif is="{xen:helper ismemberof, $user, 13} "/>
    <div class="backImg99">          
<xen:else />
    <div class="backImg1">
</xen:if>

Now all accounts will work, and mesh well, unless the main account is set to 6. If that is the case, then the rest will have that look. However, if say the main account selects 10, then the subaccount will style as it is supposed to.
 
Last edited:
Did you find the correct conditional, or whatever it may be to fix this?

I have:
Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
    <div class="backImg2">
<xen:elseif is="{xen:helper ismemberof, $user, 7} "/>
   <div class="backImg3">
<xen:elseif is="{xen:helper ismemberof, $user, 8} "/>
    <div class="backImg4">
<xen:elseif is="{xen:helper ismemberof, $user, 9} "/>
    <div class="backImg6">
<xen:elseif is="{xen:helper ismemberof, $user, 10} "/>
    <div class="backImg5">
<xen:elseif is="{xen:helper ismemberof, $user, 13} "/>
    <div class="backImg99">         
<xen:else />
    <div class="backImg1">
</xen:if>

Now all accounts will work, and mesh well, unless the main account is set to 6. If that is the case, then the rest will have that look. However, if say the main account selects 10, then the subaccount will style as it is supposed to.
This bug was fixed in the last update.
 
Yeah, I upgraded before I posted here. Also rechecked everything, did everything possible. Just not sure what the issue is.
Gossamer's problem was related to the user group styling that can be added in the ACP and not a template issue. If you can further explain or track down what is happening on your site I can have a look and see if I can replicate the problem.
 
Gossamer's problem was related to the user group styling that can be added in the ACP and not a template issue. If you can further explain or track down what is happening on your site I can have a look and see if I can replicate the problem.

Going back through and adding it as it was now...

I did have the usergroups weighted (2000, 2001,2002, 2003, etc..) Going to try and make them all equal to see what changes, if anything.
 
Ok, I have it back up.

It's still doing it.

If you'd like to login as my user, and select the accounts and change them, you can. Just let me know.
 
I can confirm it is still happening. I've tested on two separate accounts, with separate sub accounts. If you'd like a login to test, I can send you the details.
 
@Waindigo - I just added a new sub-account, but it looks like the option to automatically place the sub-account into a specific usergroup isn't working correctly.

What I'd like is for all new sub-accounts to be created with "Characters" as their primary usergroup.

I've pasted a screencap below of my settings. Could you please tell me if there's something I need to do differently to make this work?
 

Attachments

  • Screen shot 2014-07-01 at 1.42.17 PM.webp
    Screen shot 2014-07-01 at 1.42.17 PM.webp
    29 KB · Views: 7
Alright... here is an account. Sheldon is the main account, and it's sub account is Nodlehs and Spawn. Here is the postbit of each.

Now, each has correctly chosen their personality, which has them in different usergroups. I can confirm this portion in the AdminCP.

I can start with the subs, and choose their's, and it displays fine, as long as I am not messing with the main account. However, once I change the main account's, then the other two change over as well.

3.webp

Here is the code for my conditional statements (this is for the background image, the font is the same as well, just a minor change in where it is and class name)
Code:
<xen:if is="{xen:helper ismemberof, $user, 13}">
    <div class="backImg99" />
<xen:elseif is="{xen:helper ismemberof, $user, 10} "/>
    <div class="backImg5" />
<xen:elseif is="{xen:helper ismemberof, $user, 9} "/>
    <div class="backImg6" />
<xen:elseif is="{xen:helper ismemberof, $user, 8} "/>
    <div class="backImg4" />
<xen:elseif is="{xen:helper ismemberof, $user, 7} "/>
   <div class="backImg3" />
<xen:elseif is="{xen:helper ismemberof, $user, 6}" />
    <div class="backImg2" />
<xen:elseif is="{xen:helper ismemberof, $user, 14}" />
    <div class="backImg98" />        
<xen:else />
    <div class="backImg1" />
</xen:if>

Here is the thread, so you can see it: http://superheroes.zone/threads/character-personality-selection.14/page-3#post-600

As you can see, the names work correctly. They are displaying the correct color. The rest... not so much.
 
Top Bottom