Undefined property: stdClass::$urlid after doing feedback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mahara |
Low
|
Robert Lyon | ||
| 1.6 |
Low
|
Robert Lyon | ||
| 1.7 |
Low
|
Robert Lyon | ||
| 1.8 |
Low
|
Robert Lyon |
Bug Description
I set up a new site and created a page as admin user. I added some feedback to page and then when I went to navigate away I got:
[WAR] a0 (lib/user.php:1629) Undefined property: stdClass::$urlid
Call stack (most recent first):
log_
error(8, "Undefined property: stdClass::$urlid", "/var/www/
profile_
ArtefactTyp
ArtefactTyp
add_
from what I could tell from the code the profile_url() call was fetching info about $user and that information was being called from get_user_
Aaron Wells (u-aaronw) wrote : | #1 |
Aaron Wells (u-aaronw) wrote : | #2 |
Actually I can't replicate the group-creation warning message I thought I was seeing. I was testing some things relating to feedback at the same time, so perhaps I was actually seeing this error message.
I thought it might be related to Bug 1058416, but reverting to before the patch for that bug I still get the issue, so it seems to be unrelated after all.
Aaron Wells (u-aaronw) wrote : | #3 |
Ah, this bug only happens if you have $cfg->cleanurls = true;, and only for the admin user. It's because the admin user's urlid doesn't get created at installation time. Instead of going through create_user(), the admin is created by direct DB insert.
tags: | added: bite-sized cleanurls |
Changed in mahara: | |
importance: | Undecided → Low |
Robert Lyon (robertl-9) wrote : | #4 |
Have added a patch for this
https:/
Changed in mahara: | |
assignee: | nobody → Robert Lyon (robertl-9) |
status: | New → In Progress |
milestone: | none → 1.9.0 |
Reviewed: https:/
Committed: http://
Submitter: Son Nguyen (<email address hidden>)
Branch: master
commit 8bd31fc7fa5ff6c
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 11:51:37 2013 +1300
Checking for $user->urlid before trying to access it (bug #1253462)
In some cases the $user->urlid may not be present - this checks for it
before accessing it otherwise it falls back to the $id to get info
Change-Id: I989e68321402f4
Signed-off-by: Robert Lyon <email address hidden>
Changed in mahara: | |
status: | In Progress → Fix Committed |
Robert Lyon (robertl-9) wrote : | #6 |
patches for:
v1.6 https:/
v1.7 https:/
v1.8 https:/
Mahara Bot (dev-mahara) wrote : | #7 |
Reviewed: https:/
Committed: http://
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.8_STABLE
commit c74950702dcab75
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 11:51:37 2013 +1300
Checking for $user->urlid before trying to access it (bug #1253462)
In some cases the $user->urlid may not be present - this checks for it
before accessing it otherwise it falls back to the $id to get info
Change-Id: I989e68321402f4
Signed-off-by: Robert Lyon <email address hidden>
Mahara Bot (dev-mahara) wrote : | #8 |
Reviewed: https:/
Committed: http://
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.7_STABLE
commit 70cc2e13bbf24a3
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 11:51:37 2013 +1300
Checking for $user->urlid before trying to access it (bug #1253462)
In some cases the $user->urlid may not be present - this checks for it
before accessing it otherwise it falls back to the $id to get info
Change-Id: I989e68321402f4
Signed-off-by: Robert Lyon <email address hidden>
Mahara Bot (dev-mahara) wrote : | #9 |
Reviewed: https:/
Committed: http://
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.6_STABLE
commit ff9142fc5e001d8
Author: Robert Lyon <email address hidden>
Date: Thu Nov 21 11:51:37 2013 +1300
Checking for $user->urlid before trying to access it (bug #1253462)
In some cases the $user->urlid may not be present - this checks for it
before accessing it otherwise it falls back to the $id to get info
Change-Id: I989e68321402f4
Signed-off-by: Robert Lyon <email address hidden>
Changed in mahara: | |
status: | Fix Committed → Fix Released |
I noticed a warning message about "Undefined property: stdClass:$urlid" while creating a new group in similar circumstances.
I bet this is related to that recent bug about copied pages not properly getting their urlid filled in.