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) »
  • Profile for search results requires "Public Pages"
Pages: [1]

Author Topic: Profile for search results requires "Public Pages"  (Read 1231 times)

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Profile for search results requires "Public Pages"
March 23, 2011, 10:54:06 am
I would like to display the results of an Advanced Search using a profile, but it does not appear to be displaying properly. The Advanced search results just include name and a "view, edit, more" column. The fields that i tried to include in the search aren't there, even when I select my profile in the "Search Views."

These fields include custom data fields that are in custom data sets which are used only for one contact sub-type. Possibly, is this where the problem lies? I notice that when I force the use of this profile in basic search by adding "?id=11" in the url, the resulting search results are also displaying like they do above. So I think its a problem with the profile I created.

Ideally, I would like to use the Search builder to select the records, and be able to display the results using a profile - any way to do this, easily?
« Last Edit: March 25, 2011, 08:24:44 am by jimurl »

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: Profile for search results not working
March 23, 2011, 12:35:07 pm

can u create a simple profile group  for contact  (and then Individual) and see if that works

i suspect it will, so search views probably does have a bug with displaying sub-types

would be great if you can investigate and figure out what/why/where and submit a patch. ping us on irc to get started

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

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Re: Profile for search results not working
March 23, 2011, 02:12:14 pm
By "create a simple profile group " do you mean, create a new profile? I did that, keeping it very simple, with only a few fields from the individual contact type. I am not sure if you mean this, or create a new group. Anyway, that didn't resolve it- the table headers were still missing. I'm afraid I will need a little more direction to take off and start testing/debugging this.

I would be interested in finding where this problem is, if I can get this a few other items worked out, CIVICrm will work well for us.

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: Profile for search results not working
March 23, 2011, 03:06:35 pm

can you try this out on our demo machine (with a profile with individual fields and also with some subtype specific fields) and see if u get the same behavior

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

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Re: Profile for search results not working
March 23, 2011, 10:31:47 pm
Hello Lobo,

Yes, I was able to reproduce this on the Civicrm drupal demo server.

Steps to reproduce:
1. Create a profile. Check used for ... "search results" checkbox. Add fields, as many as you like. On the Demo Civicrm setup, I created one called "Simple profile - ST" that has fields, different fields, some custom data, some fields from individual (type), etc. I also repeated it with a "simpler profile" which includes only fields from Individual.

2. go to Search -> Advanced Search. Under "search views", select your view, choose some query parameters, and click search.

The results are returned, but not the field columns representing the profile you just created. Instead, just the default "List Name", along with view, edit, more> links.

I tried to find where this would be generated, perhaps ... civicrm/CRM/Profile/Page/View.php ; but I got lost pretty quickly. 

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: Profile for search results not working
March 24, 2011, 07:05:19 am

check:

http://drupal.demo.civicrm.org/civicrm/contact/search/advanced?reset=1&id=1&force=1

and seems to work :)

Note that u need the fields to have "results column selected". You might also need to ensure that the visibility is "public pages"

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

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Re: Profile for search results not working
March 24, 2011, 10:41:43 pm
Yes, you are totally correct lobo. In order for the columns to show correctly, I did need to checkoff the 'results column selected'. In the visibility of each field I had not chosen the VISIBILITY t vlues that would allow this option to pop up .Those values for the profile field listing need to be set to : "Public Pages" or "Public Pages and Listings". It didn't even occur to me to alter this setting.

I definitely understand that access to view or edit profiles is granted via ACL, I just took the 'public pages and listings' at face value , and thought, "that doesn't apply to this situation", and excluded that visibility.

I was concerned about non-authenticated, or under-qualified , users being able to view contact details. But it appears this is taken care of the ACL  level.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Profile for search results not working
July 17, 2011, 04:04:09 pm
I never quite understood why the fields have to be public to be on a result column (either on advanced search or as the default search result), because both are used only for admin.

@dlobo, could it be something we fix at the sprint?

Quote from: Donald Lobo on March 24, 2011, 07:05:19 am
Note that u need the fields to have "results column selected". You might also need to ensure that the visibility is "public pages"
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Profile for search results requires "Public Pages"

This forum was archived on 2017-11-26.