Warnings when adding existing users by CSV

Bug #1051792 reported by Son Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon
1.5
Fix Released
Low
Unassigned
1.6
Fix Released
Low
Unassigned
1.7
Fix Released
Low
Unassigned

Bug Description

Version: all

When admins added a user by CSV (/admin/users/uploadcsv.php), if the remote username has been taken and the option 'Update users' was disable, the following warning showed up:

[WAR] 9e (lib/mahara.php:1117) Object of class stdClass could not be converted to string
Call stack (most recent first):

    log_message("Object of class stdClass could not be converted to...", 8, true, true, "/home/sonn/code/mahara/htdocs/lib/mahara.php", 1117) at /home/sonn/code/mahara/htdocs/lib/errors.php:446
    error(4096, "Object of class stdClass could not be converted to...", "/home/sonn/code/mahara/htdocs/lib/mahara.php", 1117, array(size 3)) at Unknown:0
    sprintf("Line %s of the file specifies a remote username "%...", 2, "u01", object(stdClass)) at Unknown:0
    call_user_func_array("sprintf", array(size 4)) at /home/sonn/code/mahara/htdocs/lib/mahara.php:1117
    format_langstring("Line %s of the file specifies a remote username "%...", array(size 3), "en.utf8") at /home/sonn/code/mahara/htdocs/lib/mahara.php:490
    get_string_location("uploadcsverrorremoteusertaken", "admin", array(size 3)) at /home/sonn/code/mahara/htdocs/lib/mahara.php:293
    get_string("uploadcsverrorremoteusertaken", "admin", 2, "u01", object(stdClass)) at /home/sonn/code/mahara/htdocs/admin/users/uploadcsv.php:338
    uploadcsv_validate(object(Pieform), array(size 16)) at Unknown:0
    call_user_func_array("uploadcsv_validate", array(size 2)) at /home/sonn/code/mahara/htdocs/lib/pieforms/pieform.php:1324
    Pieform->validate(array(size 16)) at /home/sonn/code/mahara/htdocs/lib/pieforms/pieform.php:492
    Pieform->__construct(array(size 4)) at /home/sonn/code/mahara/htdocs/lib/pieforms/pieform.php:161
    Pieform::process(array(size 4)) at /home/sonn/code/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 4)) at /home/sonn/code/mahara/htdocs/admin/users/uploadcsv.php:646

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

This is only when the upload failed, and so I will target for 1.7

Changed in mahara:
status: New → Triaged
importance: Undecided → Low
milestone: none → 1.7.0
tags: added: admin bite-sized csvupload
tags: added: php54
tags: added: academy
Revision history for this message
Aaron Wells (u-aaronw) wrote :
Changed in mahara:
assignee: nobody → Robert Lyon (rlyon)
milestone: 1.7.0 → 1.8.0
status: Triaged → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2067
Committed: http://gitorious.org/mahara/mahara/commit/e8cf538dee3d5635b8fe5d742c91e4122cd1379f
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit e8cf538dee3d5635b8fe5d742c91e4122cd1379f
Author: rlyon <email address hidden>
Date: Wed Apr 17 14:43:29 2013 +1200

Fix the remote username warning (Bug #1051792)

Trying to pass stdClass Object rather than the wanted username string

Change-Id: Ide5323d239854fa0d131c3941731432e81c7d0d7
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2125
Committed: http://gitorious.org/mahara/mahara/commit/30a3ed500d8bf3be9a0a065ff68da1fe4446c48a
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.7_STABLE

commit 30a3ed500d8bf3be9a0a065ff68da1fe4446c48a
Author: rlyon <email address hidden>
Date: Wed Apr 17 14:43:29 2013 +1200

Fix the remote username warning (Bug #1051792)

Trying to pass stdClass Object rather than the wanted username string

Change-Id: Ide5323d239854fa0d131c3941731432e81c7d0d7
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2126
Committed: http://gitorious.org/mahara/mahara/commit/76e08ccdc1e3c10ba84b1f78c890937732f894f2
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.6_STABLE

commit 76e08ccdc1e3c10ba84b1f78c890937732f894f2
Author: rlyon <email address hidden>
Date: Wed Apr 17 14:43:29 2013 +1200

Fix the remote username warning (Bug #1051792)

Trying to pass stdClass Object rather than the wanted username string

Change-Id: Ide5323d239854fa0d131c3941731432e81c7d0d7
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2127
Committed: http://gitorious.org/mahara/mahara/commit/a862288009ee96af28c89ee6497a0f6083df0878
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.5_STABLE

commit a862288009ee96af28c89ee6497a0f6083df0878
Author: rlyon <email address hidden>
Date: Wed Apr 17 14:43:29 2013 +1200

Fix the remote username warning (Bug #1051792)

Trying to pass stdClass Object rather than the wanted username string

Change-Id: Ide5323d239854fa0d131c3941731432e81c7d0d7
Signed-off-by: rlyon <email address hidden>

Revision history for this message
Aaron Wells (u-aaronw) wrote :
Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0rc1 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.