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 Profiles (Moderator: Dave Greenberg) »
  • [Solved] WordPress edit profile link/permission issues
Pages: [1]

Author Topic: [Solved] WordPress edit profile link/permission issues  (Read 1248 times)

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
[Solved] WordPress edit profile link/permission issues
April 07, 2014, 01:12:50 pm
I'm having a devil of a time sorting out a link to allow anonymous (not logged in) users to edit their profile.

I started by using the info from:
https://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles#LinkingProfiles-LinkingtoBuilt-inContactViewandEditPage%28s%29

I looked at http://forum.civicrm.org/index.php/topic,31300.msg135046.html#msg135046 which seemed like there were similar issues, and tried the several fixes suggested. To no avail.

This gave me a link like:
http://mydomain.org/civicrm/profile/edit?reset=1&gid=13

The link just doesn't work at all. Getting a 404 error. I tried it without the user id and the checksum, still no go.

I tried copying the URL structure from the opt out link that's generated. But that loaded the form on my frontpage and caused layout problems. After setting a specific page (which I called "messages"), the opt out url worked.

So I tried
http://mydomain.org/messages/?page=CiviCRM&q=civicrm/profile/edit?reset=1&gid=13

Which gave me "You do not have permission to execute this url".

I tried it with/out a specific user id tacked on at the end, and with/out a checksum. I tried it being completely logged out of the site, logged in as administrator, logged in as the user associated to the ID in question. I still bump into no persmission to execute URL. I switched browser to make sure it wasn't a cache issue

I went into CiviCRM ACL and added edit my profile to all user under WordPress ACL. I tried adding a CiviCRM role of "anonymous" and granting it privilege of editing that profile. Nada.

//Edit: Also looked at https://wiki.civicrm.org/confluence/display/CRMDOC/Displaying+Public+Forms+in+WordPress+Frontend+Sites but no go

I'm at my wit's end, and could really use ideas on resolving this.

Thank you

« Last Edit: April 07, 2014, 04:21:59 pm by vavroom »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: WordPress edit profile link/permission issues
April 07, 2014, 03:43:04 pm

Do you have the role: 'Anonymous User' here:

http://wordpress.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/access/wp-permissions&reset=1

If not, something went wrong with your install / upgrade and might want to try with a clean install (the demo has some issues on the breadcrumb links which we are investigating)

What were the error messages when u tried with a WP specific url as mentioned here

http://wordpress.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/access/wp-permissions&reset=1

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Re: WordPress edit profile link/permission issues
April 07, 2014, 04:21:36 pm
Thanks Donald, I appreciate the response.

Quote from: Donald Lobo on April 07, 2014, 03:43:04 pm
Do you have the role: 'Anonymous User'

Yes, I did. I also set the permissions to "view my contact" and "edit my contact". But not to "profile listings and forms"

Quote from: Donald Lobo on April 07, 2014, 03:43:04 pm
What were the error messages when u tried with a WP specific url as mentioned here

That looks like the same link as the one for anonymous user :) However, the error message was:

"You do not have permission to execute this url"

That said, IT IS SORTED!!! I appreciate Chris' support.

On top of the anonymous permission to "profile listings and forms", there were a couple issues:

The URL contained a question mark instead of an ampersand. I had "edit?reset" instead of "edit&reset". This mistake probably comes from my attempting to adapt the URL suggested on https://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles#LinkingProfiles-LinkingtoBuilt-inContactViewandEditPage%28s%29

That page suggests: http://<site root>/civicrm/profile/edit?reset=1&gid=N&id={contact.contact_id}&{contact.checksum} (note the question mark instead of ampersand). However that URL structure kept giving me 404 errors. In adapting the link, I kept the question mark, where I should have used an ampersand.

Finally, stupid mistake on my part - I was using {contact.id} instead of {contact.contact_id}.

It's the little things. Thanks again to all who helped.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • [Solved] WordPress edit profile link/permission issues

This forum was archived on 2017-11-26.