"Copy page" button on group homepage to always copy page into personal portfolio

Bug #1012924 reported by Kristina Hoeppner
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Liuba Kazakov

Bug Description

When you are a member of a group and do not have page adding/editing privileges, but you click on the "Copy page" button on the group homepage, you get an error message and "Site unavailable".

----
[WAR] 5d (lib/view.php:386) View::_create: User 6 is not permitted to create a view for group 2
Call stack (most recent first):

    View::_create(array(size 6), "6") at /home/kristina/code/16stable/htdocs/lib/view.php:253
    View::create_from_template(array(size 6), 52) at /home/kristina/code/16stable/htdocs/lib/view.php:4325
    createview_submit(object(Pieform), array(size 6)) at Unknown:0
    call_user_func_array("createview_submit", array(size 2)) at /home/kristina/code/16stable/htdocs/lib/pieforms/pieform.php:512
    Pieform->__construct(array(size 7)) at /home/kristina/code/16stable/htdocs/lib/pieforms/pieform.php:161
    Pieform::process(array(size 7)) at /home/kristina/code/16stable/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 7)) at /home/kristina/code/16stable/htdocs/blocktype/groupviews/lib.php:146
    PluginBlocktypeGroupViews::get_data("2") at /home/kristina/code/16stable/htdocs/blocktype/groupviews/lib.php:71
    PluginBlocktypeGroupViews::render_instance(object(BlockInstance)) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/kristina/code/16stable/htdocs/lib/mahara.php:1351
    call_static_method("PluginBlocktypeGroupviews", "render_instance", object(BlockInstance)) at /home/kristina/code/16stable/htdocs/blocktype/lib.php:720
    BlockInstance->render_viewing() at /home/kristina/code/16stable/htdocs/lib/view.php:1538
    View->build_column(1, false) at /home/kristina/code/16stable/htdocs/lib/view.php:1506
    View->build_columns() at /home/kristina/code/16stable/htdocs/group/view.php:82

----

When you try the same from the "Pages" tab, you can copy the page just fine into your own portfolio.

Changed in mahara:
status: New → In Progress
Liuba Kazakov (liuba)
Changed in mahara:
assignee: nobody → Liuba Kazakov (liuba)
Liuba Kazakov (liuba)
Changed in mahara:
assignee: Liuba Kazakov (liuba) → nobody
Liuba Kazakov (liuba)
Changed in mahara:
assignee: nobody → Liuba Kazakov (liuba)
Revision history for this message
Liuba Kazakov (liuba) wrote :

The fix is committed for review. Details are here: https://reviews.mahara.org/#/c/1350/

Changed in mahara:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
assignee: Liuba Kazakov (liuba) → nobody
Revision history for this message
Liuba Kazakov (liuba) wrote :

Kristina, can you add someone to review the fix?

Changed in mahara:
assignee: nobody → Liuba Kazakov (liuba)
Revision history for this message
Liuba Kazakov (liuba) wrote :

Kristina,

I've changed the commit message - can you review the commit again? Thank you.

Revision history for this message
Liuba Kazakov (liuba) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Richard and I had a discussion about the behavior of the button, and it is actually always supposed to copy the page into a person's portfolio. It should never have copied the page into the group.

Thus, the "Copy page" button on the group homepage means "Copy page to your portfolio". When you see it on the "Pages" tab, you also copy the page into your portfolio because you only see the "Copy page" button when you do not have add / edit permissions.

When you do have add / edit permissions, you see the "Copy a page" button next to "Create a page" button and that creates a group page. On the homepage you still see the "Copy page" button and should be able to copy the page into your personal portfolio and not as page into the group.

summary: - Copying page from the group homepage creates error
+ "Copy page" button on group homepage to always copy page into personal
+ portfolio
Revision history for this message
Liuba Kazakov (liuba) wrote :

Richard and Kristina,

I've committed the new workflow for review. It is in here:
https://reviews.mahara.org/#/c/1359/1

Revision history for this message
Liuba Kazakov (liuba) wrote :

Richard,

Thank you for the review and the hint on how to fix.

New fix is committed:

https://reviews.mahara.org/#/c/1360/

Revision history for this message
Liuba Kazakov (liuba) wrote :

I squashed all the commits together to have a cleaner version. It is in:

https://reviews.mahara.org/#/c/1355/

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/1355
Committed: http://gitorious.org/mahara/mahara/commit/0f8e56d38459cc5e055a659c2270b51a27fa99f8
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit 0f8e56d38459cc5e055a659c2270b51a27fa99f8
Author: Liuba Kazakov <email address hidden>
Date: Tue Jun 19 08:37:27 2012 +1000

    Bug#1012924: 'Copy page' should always copy to user's

    portfolio not group pages

    Change-Id: Id056d644afc3645fc781023336bf4ac3c1aff489
    Signed-off-by: Liuba Kazakov <email address hidden>

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

Reviewed: https://reviews.mahara.org/1366
Committed: http://gitorious.org/mahara/mahara/commit/60493d3ab2eff59d11096ba73b337be71e684a8d
Submitter: Richard Mansfield (<email address hidden>)
Branch: 1.5_STABLE

commit 60493d3ab2eff59d11096ba73b337be71e684a8d
Author: Liuba Kazakov <email address hidden>
Date: Tue Jun 19 08:37:27 2012 +1000

    Bug#1012924: 'Copy page' should always copy to user's

    portfolio not group pages

    Change-Id: Id056d644afc3645fc781023336bf4ac3c1aff489
    Signed-off-by: Liuba Kazakov <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.5.2
Melissa Draper (melissa)
Changed in mahara:
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.