CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Edit button missing for all users except one
Pages: [1]

Author Topic: Edit button missing for all users except one  (Read 966 times)

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Edit button missing for all users except one
November 22, 2013, 07:00:21 am
When viewing a contact summary page, all our staff (except me) have only the 'Actions' and 'Delete' buttons. They do not have the 'Edit' button. They can all add and edit contact records satisfactorily, once they've limped their way to an edit form via the 'recently viewed' menu, and no-one has ever reported a problem to me, but they've been relying on workarounds. This isn't a satisfactory situation any more, and I need to get to the bottom of why they don't have the edit button.

I have not used a custom template. I have tried adding ACLs for the 'staff' group to give edit permission on all groups of contacts, or deleting all ACLs. Neither helps. I have tried re-syncing to the drupal groups, and double-checked the Drupal permissions. I am now at my wits' end trying to give people what I thought was the most basic functionality.

Can anyone advise why the edit button might not appear?

Detlev

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
    • Software für Engagierte e.V.
  • CiviCRM version: 4.5
  • CMS version: Drupal
Re: Edit button missing for all users except one
November 22, 2013, 07:24:17 am
Of 6 different CiviCRM installs, I have access to, 5 are working correctly, but one shows the same problem.

Since we just recognized that problem yesterday, it might be in connection with the upgrade from 4.3 to 4.4, which was performed recently. However, most of the other installs are on 4.4 too, and don't show the problem (or maybe only I don't see the problem, because I am the only user affected?)


nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Edit button missing for all users except one
November 22, 2013, 07:51:03 am
We're also on 4.4 and I believe the problem has only recently surfaced, however my users are adamant they've never had the 'edit' button. Far be it for me to challenge the users...

Did the permission names change in 4.4 ? Is it possible that the logic behind displaying the button hasn't caught up with the change in permission naming?

Detlev

  • I post occasionally
  • **
  • Posts: 68
  • Karma: 2
    • Software für Engagierte e.V.
  • CiviCRM version: 4.5
  • CMS version: Drupal
Re: Edit button missing for all users except one
November 22, 2013, 07:54:31 am
At least, it seems to be no general problem, that happens always on 4.4.

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Edit button missing for all users except one
November 22, 2013, 07:55:50 am
I have had one user confirm to me that she used to have an edit button, and it has disappeared since upgrade to 4.4.1. It is sounding like a bug.

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Edit button missing for all users except one
November 22, 2013, 08:38:32 am
From the Summary.tpl:

Code: [Select]
          {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. *}
          {if $permission EQ 'edit' && call_user_func(array('CRM_Core_Permission','check'), 'edit my contact')}
            <li>
              {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"}
              <a href="{crmURL p='civicrm/contact/add' q=$editParams}" class="edit button" title="{ts}Edit{/ts}">
              <span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
              </a>
            </li>
          {/if}

It seems to me that the logic in the if statement doesn't match the logic in the comment. I can't see what should be there - but I tried just swapping the "&&" for "||" and that brought the edit button back. But that doesn't feel like the correct fix. Anyone got a better one?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Edit button missing for all users except one
February 14, 2014, 02:04:30 am
Hi,

One site has that problem (not after an upgrade, but randomly yesterday). I did clear the cache (civicrm/clearcache) and it went back.

Might be a race condition while smarty compiles the template, or something.

Anyway, edit button is back, users happy.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Edit button missing for all users except one
May 01, 2014, 03:20:34 am
This is also a problem on my site.

I agree with nickholden that there is a problem with the Summary.tpl file where the statement doesn't match the comment.

My workaround was just to grant other staff members the "Edit my contact" permission and now they have the Edit button.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Edit button missing for all users except one

This forum was archived on 2017-11-26.