InvalidParameterException Part 2

I am moving this everyone's very favorite topic here because the other topic was getting too lenghty for reading thru...

I am getting my brains tied up with the UserName sanitize string and the MySql mysql_real_escape_string () function

I want to try some tests to determine whether my assumptions are correct or smoke in the dark;;;-)

 

  • Not your PlugIn's fault !! -- if people wanna use a test-case loader tool on their live site lolz ;-) might as well as go ahead and make max sql connections = 10 ;;;;;; heh heh --> does wonders for peformance !

  • this page has a google rank of 4 wow

  • you googled wrongly ;)

    try "InvalidParameterException Part2" lolz

  • Been a long time with "Invalid Parameter Exceptions". Had it happen to the Admin tonight and it funnier that we could figure out what's actually causing this to happen and got lucky and fixed it.

  • Thanks Dhrup for all your hard work on this. I have read and read and tried your code and all i get is

    (1) getFilenameOnFilestore ( ElggFile ) 
    [ /mod/riverdashboard/ / 
     / 
    profile/small.jpg / 
     / 
     ] / 
    ::::END:::
    

     i am having no luck fixing it, all i am able to do is generate a few more in the river and members and the problem gets truncated.. any more ideas?

  • Try


    mail(
            "--PUT--YOUR--EMAIL--ID--HERE--@xxxx.com"
           ,"(1) getFilenameOnFilestore()"
           ,"(1) getFilenameOnFilestore ( ElggFile ) ==>\n\n"
               . "REQUEST_URI (". $_SERVER["REQUEST_URI"] . ") / \n"
               . "DIR_ROOT    (". $file->dir_root      . ") / \n"
               . "FILENAME    (". $file->filename      . ") / \n"
               . "LOGGED-USER (". get_loggedin_user()  . ") / \n"
               . "\nPOSTVARS==>\n"
               . $postvars
               ."\n::::END:::"
            );

     

  • hey Dhrup - thanks so much for your help - is there a problem if i don't throw the exception at all - ie if i just comment out this line

    //  throw new InvalidParameterException(elgg_echo('InvalidParameterException:MissingOwner'));

     

    i really hate these kind of errors coming up on a production site - they should be logged but not bring the site down (in effect)

  • hmmm;;; that's an idea !!!! why not ?

  • well i did it and it works perfectly - the only thing now is to grab all that information you are emailing and log it as well..  THanks Dhrup

     

    i think i am going to have a look at all these kind of errors and see if i can just log & email them (with the info you are grabbing) rather than echo them (it is so amateurish)

    is there a smart way?

  • I encountered this error when using the Safari browser (PC version) to create a group.  Safari logs you out of elgg periodically (not sure how long of a time before you are logged out) and during this I was creating a group profile.  I pressed save, not knowing i was logged out, and it appeared to save, but then yielded this fun "InvalidParameterException, All files must have an owner!" error message.  I was able to recover from the error finally, but i don't want it to happen again!

    In the previous thread for this issue, Cash suggested a line of code in the mod/groups/actions/edit.php file (placing action_gatekeeper();  following the global $CONFIG; line.)  I did implement this change Cash suggested, however after making that change, i am unable to edit/save group profile information.  I get the error Form is missing __token or __ts fields in the comment window at the top when i click on SAVE at the bottom of the group edit form.

    Any help/advice would be greatly appreciated.  I mainly want to install some code to prevent the InvalidParameterException that I originally had due to being logged out and then pressing SAVE in group edit.  It caused a group to be created with no members (or owner) and Elgg did not like that!