InvalidParameterException All files must have an owner!

InvalidParameterException All files must have an owner!

Please helppppppppppppp  Im running nuts.

I deleted a user in the databse and i started getting this problem..this happened yesterday and since then, when i go to members or user administration, it gives me this error "InvalidParameterException All files must have an owner!...ive done everything in the blog about the solution ie starting the crontrigger and enabling the garbage collector for 1 week...its still not working.

is there any way i can manually turn on the garbage collector...cos 1 week is too long!

I need some help plssssssssssss

  • As usual Dhrup you have been able to able to find things out But what can I do with this information I cannot as far as I know delete the user as I believe this would cause more problems
    Suggestions ??
  • @Cash

    You mind posting your patch for those brave enough to mess around with their core code ;-)

    also maybe a simple php mail () to the admin with all relevant data might also help.

    e.g. GUIDs, current UserId, any data that might be useful in trouble-shooting...

    thx.

     

  • I'm thinking that if maybe we can do manual "garbage check" ( which might involve a fair bit of code I imagine ;-) -- that could show up trouble spots...

    e.g.

    $owner = $file->getOwnerEntity();
    if (!$owner)

    print out :=

    $file has no owner.. problem :-(

    and so on... maybe for any other entities which may cause similar problem.

  • Something definitely needs to be done

    I know I can hunt down the offending guid number, but what then? I don't really know what to do at that point.

    p.s

    bed

  • Most likely cause - someone loading a create group page and then submitting it while logged out (server reboot or other cause). This is a bug in Elgg 1.5. It doesn't confirm that the user is logged in when creating a group. The fix is already in svn.

    In /mod/groups/actions/edit.php, add

    action_gatekeeper();

    after global $CONFIG;

    Note: this will not fix already corrupted groups in your database and there may be other bugs in Elgg that cause the same problem.

  •  

    @ Cash this sounds logical and I understand what your saying with this, as we also ran into this bug earlier when deleting some one from our site.

    Areas of the site then wouldn't function because wherever the deleted person left any content it would return a white page.

    This however is slightly different

    For anyone's information please read on  

    We have no problems with groups. The exception was thrown from the members plug in, and the latest members widget. I believe it was caused by someone registering, as the latest member widget on the activity page still functions but this only shows members who have photos.

    This does not mean it is a problem with the registration process. what it means is elgg needs a better way of handling this type of error, as it can, and has happened, in a few different areas of the site.

     

    http://community.elgg.org/mod/riverdashboard/

    If you have a look above at elgg.org's activity, you will see this sites activity flow. When I looked the first page covered a 2hr time span.

    *2* hrs*

    If you look at our sites activity page it only covers ****10 minutes****  meaning that there is 1200% more activity on our site than here. What does this mean.

    It means it will more than likely happen here sooner or later. However as elgg dot org has a lot less actinity and a lot lot more resources, souped up dedicated servers etc, they will not have the the same problems of database/server stalls as us. therefore elgg.org will not have to reboot as often as we do.

    But it will happen eventually and on any site, unless their is some work around for this

    Concussion is, it is caused during write the processes to the database when a reboot occurs.

    This then suggests that an active/successful site will eventually end up with a corrupt database. The more resources that are thrown at the site and the less the site is active will mean that there will be more of a delay before the corruption should hit, but a delay is not guaranteed as it could happen at any time..

    I believe that, as Mark Povey pointed out, getting a half a write to a database, because of a server reboot is impossible to code against, however being able to handle the subsequent error in a more acceptable way than breaking the site should be

    When this happened to us once again last night it meant that no one could go to their, or anyone else's profile/dashboard. This basically meant that the site was broken. It took us 22 seconds to fix this situation, and get everyones profile/dashboard working again. Why so quick? Because we have had so much experience with this situation, that we now no exactly where to look and what to do.

    The reason for the drastic decision to move our site in the first place, to an empty database was because the error was being thrown by tinypics, meaning all group icons, all members albums/photos would not show. It would throw the exception Turning off tinypics resolved the exception being thrown, however we then realized after a couple of days that our registration was plummeting We then realized that turning off tinypics or something else was causing the site catchpha not to display meaning no one could actually register Turning off site access was not a solution for us. The site was dying. Drastic surgery was needed at this point Dhrup step in to save the day.

    Dhrup you wondered why I never mentioned bringing content with us well this is the reason. We wanted to start again with a database that was as clean as possible.

    Where does our site go from here with this particular problem, simple, we wait a few days then we can turn the members plug in, and the latest members widget back on, as the offending guid number will have moved down the list, this is what this the elgg.org site has done.I have seen it in this group and it is in the members link.

    As Dhrup can attest. We started afresh with a completely empty database 2/3 weeks ago with the exception of the userentity table We lasted a little over 2 weeks before our database became corrupted again

     

    What we need is a better way to handle this exception rather than what it does now IT Breaks Your Site.

    Solutions I have seen other people do are drop the database and start again this is not a solution for a working site

     

    Running repairs, garbage collections, etc on the database have no effect on this problem As far as mysql is concerned the tables are fine

    I would like to see a clear help file on how to remove the offending guid entry that caused the exception and a better way to handle the error.

    On a very active profile page with a lot of widgets installed there are probably 400 calls to the DB one error will break the whole page while 99.75% of the data is fine 0.25% will break your site.

    I am not an expert at any of this but I now have a lot of experience of running an active elgg site

    Please point out any weakness in my arguments as I would like to try to resolve this issue for our site's, and the the rest of the elgg community's members benefit.

  • @cash I completely agree with your most likely cause --- at least as it related to groups.  In my case, I had two browsers running, one IE and the other Firefox.  I started to edit the group in one, went to look for a link to paste in the other browser. When I returned to the first browser and hit "save", it saved the group data but with no owner.

    I have since verified that you can only be active in one spot at a time.  I guess Elgg keeps track of where you are (session-wise) and when your second login comes in, it forgets about the first.  That's only a problem if you've left a form unsaved in the first browser and go back to it.

    Thanks for the patch.  That will keep this from happening again for groups --- and I assume that the same fix would apply if other forms show similar behavior.

  • @Bill -- YES, this is definitely the case.  A user can only have one active session.  I think this is what happened to us when we pulled the InvalidParameterException error.  A user had the site open in Firefox, but used Chrome to perform some task, came back, etc.

    DOES every object really need to have an owner?  What are the implications of Elgg having (and, more importantly, displaying) objects that have NO owner?  If "null" was an acceptable value, it should allow the site to continue to load, even if the troublesome content failed to load, or loaded showing no owner.

  • I wonder.. possible work-around

    how about we / someone patch the filestore.php code to substitute admin's user guid #2 when there is no owner ? might that work for a bit ? of course need more core code research to make sure this will work ok..