1

It has been suggested that I may need to allow anonymous users to view profiles. I am running CiviCRM on a WordPress site.

From what I'm reading here ...

https://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles

... I'm gathering that this may only be possible on Drupal, not WordPress. Is that correct?

If so, is it the case that non-logged-in users on WordPress are automatically allowed to view profiles?

I'm using the profile to create a public directory: 1) Create a number of custom fields 2) Create a profile ("Trainers and Coaches", gid=17) that includes those custom fields, as well as some standard fields like First Name, Last Name, etc. 3) Create a front-end profile view.

This works when I'm logged in to WordPress. (Though I had some questions about inconsistent results when clicking on fields in the profile view.)

When not logged in to WordPress, I get errors.

Using a shortcode: [civicrm component="profile" gid="17" mode="search" hijack="0"]

I get:

Sorry but we are not able to provide this at the moment.
The requested Profile (gid=17) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance.

(The profile is not disabled and is configured for use with Standalone Form or Directory and Search Views, so I guess permissions are the remaining option.)

If I use this: http://mysite.org/trainers-coaches/?page=CiviCRM&q=civicrm/profile&reset=1&force=1&gid=17

I get:

 Sorry but we are not able to provide this at the moment.
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.

(Cookies are enabled, I've tried Chrome and Safari in OSX, and Chrome and IE in Windows, with the same results. And the URL defined in WordPress is http://mysite.org.)

Any help will be greatly appreciated!

Wordpress 4.7.5 CiviCRM 4.7.17

3
  • Profiles can be used in a lot of ways. Can you provide some additional info on what you want to use a profile for?
    – KilakwaBT
    Commented May 22, 2017 at 14:46
  • Thank you, @KilakwaBT, I have given details on what I'm trying to do with the profile. It's a public directory of trainers and coaches. Commented May 22, 2017 at 18:27
  • The answer seems correct in Theory for Wordpress according to the official documentation on permissions BUT... There is no Anonymous screen in Wordpress by default on Multi-Site. The thing I did not get at first was that you need to enable this from the first site you installed when installing Wordpress - before converting to Multi-Site. BTW - I'm using a Wordpress Multi-Site. With Wordpress 4.8 and CiviCRM 4.6.28
    – Codes
    Commented Jul 5, 2017 at 12:05

1 Answer 1

3
  • Go to CiviCRM's **Administer menu » Users and Permissions » Permissions (Access Control).
  • Click "WordPress Access Control".
  • In the "Anonymous User" column, check "CiviCRM: profile view".
  • If your profile contains custom fields, check "CiviCRM: access all custom data".
  • Press "Save" at the bottom of the page.

Note that this is a quick-and-dirty approach that assumes you're OK with ANY profile being accessible by anonymous users if "Standalone Form or Directory" is checked.

1
  • In step 3 I believe you need to also have 'CiviCRM: profile listings and forms' checked.
    – KilakwaBT
    Commented May 22, 2017 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.