Call to a member function getURL() on a non-object


Elgg is running in a subfolder and I did the htaccess modifications

RewriteBase /com/


I'm having this error at login (I see all the html but there is no head section)

Fatal error: Call to a member function getURL() on a non-object in /site/com/views/default/friends/river/create.php on line 15

I have run upgrade.php

Elgg Release - 1.7.1, Version - 2010040201



  • PHP is dying before the page is created. Sounds like something is going wrong in the database and the Elgg code is not resilient enough to work around that. Actually this is reminding me of a bug that I fixed recently that will be a part of 1.7.2. If it is the same, it is not a database problem but there is a user who hasn't validated his account.

  • Well, you are right. The problem appears when:

    1) User A makes a registration, but the registration mail didn't go out (was on a test server, without sendmail configuration)

    2) An admin validates the registration

    3) The problem appears. User A can loging and everything, but has problems in the river

    Logically, it could mean that if the admin validation makes the same that the mail validation, this problem should dissappear, don't you think ?

    Thanks for the answer


  • I thought it would only happen if someone was invited to join your site using the invitefriends plugin. If you don't have email set up, I don't see how that would be possible.

    The plugins for manual validation should act in the same way as the email validation.

    Anything more that you can tell us about the problem?

  • As I told you before it happened like this, in this order

    1) Elgg install by Admin A, he sends me the login/pass because we see that sendmail wasn't working and makes me admin, so the confirmation e-mail never arrived

    2) I login with this login/pass and after I see the problem only with the dashboard

    3) The I have suppressed this account and created another account for myself (this time sendmail was working, so I validate my emai). All the contents I have done with this account have disappeared, which seems logical, and the problem gone.

    I'm going to try tomorrow to see If I can recreate the situation, I mean, I'm going to create an admin and I will not validate my email. I will login directly and see what happens. I will tell you then if I get the problem again.