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;;;-)

 

  • @SunirMalya

    "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"

    We've not heard back from you, esp the "works perfectly.." aspect. I'm looking for some more detailed feedback mi a amigo from the DeepWater lolz (ps I left AUS cc 1990 to move here to the USA).

    Have you made more progress with those funky errors ? We are after all this time of posting smarty-ass kickass code finally going to actually implement our own code on live servers !

  • Hi,

    I've had success in cleaning out my instance of this error - I was crashing when going to the Members page, or in the User admin page.

    It turned out that I had a user entity in elggentities without a matching record in elggusers_entity.

    I found the suspect record by adding an extra line to Dhrup's mail suggestion:

                           . "USER GUID   (". $owner->guid  . ") / \n"

    This told me the guid of the suspect user.  I then went to elggentities and switched the 'enabled' field to 'no' for that entity, and my error went away.

    Just to be extra careful, I wrote the following to see if there were any other problem records:

    SELECT guid FROM elggentities AS ee
    WHERE ee.type = 'user' AND NOT EXISTS (
       SELECT guid FROM elggusers_entity AS eue
       WHERE ee.guid = eue.guid
    )

    If this happens much more I'll look into whether I feel comfortable just deleting the entity rather than disabling it.

    Thanks everyone for all the suggestions!

    Mike