Hi,

I've just done a default install of commons-7.x-3.0 (and not altered any permissions) and with an authenticated user clicked to attend an event.

But how does an Authenticated user unattend? There's no button to do so where the attend event button used to be.

Thank you.

Comments

victoria_b’s picture

Version: 7.x-3.0-rc1 » 7.x-3.0
jpontani’s picture

Status: Active » Fixed
StatusFileSize
new68.97 KB
new70.28 KB

The attend button should be replaced with a cancel button. Make sure that the version of Commons Events you have is actually 7.x-3.0 (same with Commons).

Event node page:
node view

Event teaser in stream:
stream

jpontani’s picture

Status: Fixed » Postponed (maintainer needs more info)

Didn't mean to set as fixed just yet.

victoria_b’s picture

StatusFileSize
new186.47 KB
new187.44 KB

Hi jpontani,

Thank you for the quick response.

I downloaded and installed a fresh copy of Drupal Commons 7.x-3.0 and no cancel button appeared when booked onto an event with an authenticated user (Lisa Rex). I then booked onto the event as Admin and the cancel button appeared.

I proceeded to install the dev version of Commons Events 7.x-3.x-dev and again, when using Lisa Rex no Cancel button appeared. I upgraded Lisa Rex's role to an Admin and the cancel button appears.

Please see attached screenshots.

I'm using Acquia Dev Desktop on Windows 7 running Chrome, Firefox browsers.

I would try and use the latest version of "Drupal Commons 7.x-3.x-dev" but the download link is broken on the main project page.

Thank you.

jpontani’s picture

It may be a permissions issue. The 'cancel' button will only show up if the user has permission to delete their registration. So in this case, the user needs the permission to 'delete own event registration'. Authenticated users should have that permission by default, but I'm looking into what else could cause this to not show up.

jfhovinne’s picture

StatusFileSize
new543 bytes

Looks like a permission issue, since the cancel button appears after allowing authenticated users to 'delete any registration'.

But after investigation, in function theme_commons_events_attending_event($variables = array()) from file commons_events.theme.inc, registration_access('delete', $registration, $user, $registration->type) will always return FALSE for users without the 'delete any registration' permission because $author is NULL.

See registration_access in registration.module, $author = $wrapper->author->value();

The attached patch (adding author_uid in controller method) seems to fix the issue; authenticated users with 'delete own registration' permission are able to cancel their registration.
Also, if the permission is removed, the cancel button isn't displayed anymore.

jfhovinne’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Needs review
alanburke’s picture

Patch works and does the trick

jpontani’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.