Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Private Conversations User Limit?

Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

Hi there.. long Time no writing.. :sunglasses:
And why? Cause everything is goin smoooooth... :awesome::heart:

Stumbled today on this Problem:

Is there a Limit of Users in a Private Conversation? Sems that I can't put more than 20 Users...
If it is limited, how can I increase the Value of Users in a Private Conversation?

Thanx in advance... ;)

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    Try adding $Configuration['Conversations']['MaxRecipients'] = 50; to your conf/config.php

    I only guess this would help, because I'm a bit confused that you have a limit of 20 in there...

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    As always, ThX RJ... :+1:

    Hmm... I taught it is a limit... :blush:

    I have 20 User in the conversation... when I try to add a new one, I get

    "There was an error performing your request. Please try again."

    I enabled Debuging, but there are no additionally Error Informations coming... :open_mouth:

    Not sure how to go on now... :confused:

  • RiverRiver MVP
    edited September 2016

    The basic limitatation is what r_j said, but unless you have purposely added the $Configuration['Conversations']['MaxRecipients'] to your config.php. there is nothing limiting per se.

    the MaxRecipients is more of a limiter to reduce rather than to expand , since there isn't a limit set if you don't have the config statement set.

    There are however limits of 20 in the conversationmodel with respect to getting recipients and a max of showing 20 recipients in the inthisconversationmodule.

    I believe you can join a max of 5 at a time.

    if it was a MaxRecipients error due to the config you would most likely see

    "You are limited to %s recipients"

    However, I don't believe any of these settings is your problem with regards to your error message.

    I believe you are timing out in the processing.

    "There was an error performing your request. Please try again."

    often indicates that something has timed out.

    tuning of your server if you are going beyond the "norm". (or more efficient vanilla coding),

    you might look in your js console to see if there is a problem. I don't think enabling debugging will help you, but you could check your debug logs.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭
    edited September 2016

    Hey River... ThX... :+1:

    looked in my Browser Debuger, saying:

    http://caba.de/CaBaFoRuM/index.php?p=/messages/15234& Failed to load resource: the server responded with a status of 500 (Internal Server Error)

    no idea what this means, but it is a start... :smiley:
    I'll check Google for the 500 Error, and when my Users go sleeping, I'll restart the server... hopefully this will do it... :confused::dizzy::fearful:

    FYI: Did another Mass Conversation with a Testuser and random other users... works above 20 and also adding new users works fine... :open_mouth:

    Crazy... :eh::lol:

    I'll give you a quote tomorow, after getting into that error... :glasses:

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    p.s.: found some more Info:

    JSON
    Code:256
    Exeption: !!
    Class: "Gdn_ErrorException"

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    JSON means java script on… check that you allow java script in browser…

    500 is a server error…

    Did you delete the .ini files from the catch?

    Did you update your php to php5.4 ?

    Many hosts have updated and you could be a victim of php update by host. Deleting the .ini files normally fixes that.

    Did you disable all plugins and themes and use the default ?

    Weird shit is smells bad make sure no bad code is in your account.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    hmmm.... I noticed, that it has something to do with new and old members... :surprised:
    But not always... :surprised:
    Damn... always me... :mrgreen::lol:

    I'm coming from an PHPBB3 Installation, yeeeaaarrsss ago.... :mrgreen:

    OK, I give up.... It's mot so important, as this works with other mass Conversations and the forum works perfect.. :)

    @vrijvlinder : ThX.. :heart:
    It smells just like a little poop... :mrgreen::mrgreen::lol:
    I don't think that my Server is compromised... but I'll check that for shure.. ;)

    As always a pleasure to type with you all,

    many bessos,

    Dr. Sommer :mrgreen:

  • R_JR_J Ex-Fanboy Munich Admin

    If it happens with long time members ( = having many messages), but not for new members ( = having a few messages), this might really be a time out problem. Do you have the possibility to check your servers error log? If you see the 500 error, there will most probably be useful information in that log.

  • RiverRiver MVP
    edited September 2016

    @Dr_Sommer said:
    hmmm.... I noticed, that it has something to do with new and old members... :surprised:
    But not always... :surprised:

    Although my first thought was you have timed out.

    I think you are trying add a user that already exists in the conversation but was a user that was past 20.

    and there is no protection from this as far as telling you user is already in list. it justs tells you to try again, and since you can't visualize all the users past 20 you can't tell if some users are already participants.

    the InThisConversationModule shows the first 20 recipients of the conversation in the panel on the left.

    Aperson (person1)
    Bperson (person2)
    Cperson (person 3)
    ...
    ....
    thru
    .....
    ....
    Rperson
    Sperson (person 19)
    Tperson (person 20)

    if you have a conversation with Aperson (person1) thru Tperson (person20) as well as Uperson (person21) and Vperson (person22)

    if you try to add Cperson (person3) again to the conversation (even though it is already added) you will get the message saved and everything works fine.

    if you try to add Vperson (person22) again to the conversation (even though it is already added) you will get the message "There was an error performing your request. Please try again."

    which is a 256 error reported back thru json as a result of the server 500 error, which is a result of a sql error of trying to insert a user that was already inserted before.

    the reason for this is a BUG in vanilla - it only looks at the the first 20 recipients and tries to insert any user (that may already be inserted after the first 20.

    in /class.conversationmodel.php
    the array is incompletely filled from line 707 failing in line 723 and causing a sql error below.

    so you can fix things in one of two ways.

    option 1 - fill the array properly - leave the panel list alone

    https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/applications/conversations/models/class.conversationmodel.php#L707

    change

    $OldContributorData = $this->getRecipients($ConversationID);

    to

                // allows you to add up to 50 before the problem occurs.
                 $OldContributorData = $this->getRecipients($ConversationID,  50 );
    

    or

       // allows you to add up to 100 before the problem occurs.
     $OldContributorData = $this->getRecipients($ConversationID,  100 );
    

    or

    $Limit = 75
           // allows you to add up to 75 before the problem occurs.
         $OldContributorData = $this->getRecipients($ConversationID, $Limit );
    

    ==================================================================

    option 2

    if you want to increase the list of recipients (beyond 20) in the panel above addpersons to see more complete list.

    https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/applications/conversations/models/class.conversationmodel.php#L281

    public function getRecipients($ConversationID, $Limit = 20) {

    to

    // show up to 50 recipients.
    public function getRecipients($ConversationID, $Limit = 50) {
    

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited September 2016

    probably the coding should be changed in a future vanilla version- so everything is tied together.

    a specific limit should be added to config-defaults.php

    $Configuration['Conversations']['MaxRecipients'] = 50;

    then the limit could be set to $Configuration['Conversations']['MaxRecipients']

    public function getRecipients($ConversationID, $Limit = the limit from $Configuration['Conversations']['MaxRecipients'] ) {

    then the panel would show all the participants, there would be a count and limit that is obvious and the code would work correctly if adding an already existing participant. and not give you 500 errors.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited September 2016

    @Dr_Sommer

    if you want to mimic the error. this should work.

    only make this change....

    in https://github.com/vanilla/vanilla/blob/Vanilla_2.2.1/applications/conversations/models/class.conversationmodel.php#L281

    change

    public function getRecipients($ConversationID, $Limit = 20) {

    to

    public function getRecipients($ConversationID, $Limit = 3) {

    then add users

    Eeny, meeny, miny, moe, joe

    to a conversation.

    then try to add Eeny again - no problem - it should save it.,

    try to add joe again in the addperson and you should get a 500 error.

    try to add a new participant unclebob - it should save.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    Wohow... just as I was looking into all the error.logs, as RJ proposed, there comes River.... :+1::mrgreen:

    ok, yesterday I did try to add existing users from the list, did not gez an error...

    I'll try your Suggestion now and come back in 10... :mrgreen:

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    okee... I see, that I first have to update to 2.2.1. :surprised:

    public function getRecipients($ConversationID, $Limit = 20) {

    does not exist in my version.... (2.2.)

    I'll make a quick update and check then, if the error exists... :wink:

  • RiverRiver MVP
    edited September 2016

    @Dr_Sommer said:
    okee... I see, that I first have to update to 2.2.1. :surprised:

    public function getRecipients($ConversationID, $Limit = 20) {

    does not exist in my version.... (2.2.)

    I'll make a quick update and check then, if the error exists... :wink:

    well yes it exists in 2.2 but good to upgrade to 2.2.1 anyway.

    applications/conversations/models/class.conversationmodel.php

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Dr_SommerDr_Sommer Dr. of tender Programing ;) ✭✭

    @River: yep, my bad... :mrgreen:

    ok, till I backup my forum for the update, changed the limit as you proposed from 20 to 3..

    And here is where the magic begins... :mrgreen:

    1. Started the new Mass Conversation with 4 "old" user
    2. after saving, it shows only 3 Users in the list... obviously, cause the Limit is 3... was not aware of that in the first "problematic conversation", as there is no indication, that I had selected more than 20 Users... and I didn't count them before... :lol::mrgreen:
    3. now I added 3 more users, after saving, not showing in the List...
      O.o Attention: O.o
    4. added AGAIN one of the existing VISIBLE users and after saving the popup says "changes where saved"
    5. added the NON VISIBLE user .... THERE IT IS!! After saving, popup says "There was an error performing your request. Please try again."

    so there is no indication, that the User is already in the list... as well as there is no indication, that the user list exceeds the visible list... :confused:

    So you absolutely NAILED IT, River... :awesome::awesome::+1::+1:

    Now I know howto handle this... :mrgreen:

    ThX again, River.. :+1::heart:

  • @Dr_Sommer said:
    @River: yep, my bad... :mrgreen:

    ok, till I backup my forum for the update, changed the limit as you proposed from 20 to 3..

    thanks for taking time verifying and the followup, and the coroborration.

    someone else can add to github if they feel it is important.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

Sign In or Register to comment.