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 CiviMail (Moderator: Piotr Szotkowski) »
  • Can't send emails for new profiles
Pages: [1]

Author Topic: Can't send emails for new profiles  (Read 1135 times)

jforsythe

  • Guest
Can't send emails for new profiles
February 12, 2010, 12:00:23 pm
Whenever I create a new profile, if I have it set to send an email, then after entering the info for the new profile, I get:
The requested Profile (gid=1) 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
It works fine if I don't have it send an email - i.e. if "Notify when profile form is submitted?" is left blank.

CiviCRM works fine for doing bulk mailings.  SMTP outbound works fine when I test it.  Emails work fine when sending for individual contacts. 

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: Can't send emails for new profiles
February 12, 2010, 12:48:28 pm

can we get ssh access to your server

http://wiki.civicrm.org/confluence/display/CRMDOC/SSH+Access+Requirements

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

lewayotte

  • Guest
Re: Can't send emails for new profiles
February 16, 2010, 06:12:26 am
Lobo,

I'm actually a developer working for Jim on Civi... I think I figured out a possible solution to his problem.

It looks like the only time checkFieldsEmptyValues (CRM\Core\BAO\UFGroup.php) is called is when it is trying to notify an email address.

A recursive grep for checkFieldsEmptyValues shows 4 files,
CRM\Core\BAO\UFGroup.php
CRM\Contact\Form\Task\Batch.php
CRM\Contribute\BAO\ContributionPage.php
CRM\Profile\Form.php

The last three are IF conditionals which are true if the "notify" field is filled (for its respective form).

So I change L1981 in CRM\Core\BAO\UFGroup.php from:
$fields = CRM_Core_BAO_UFGroup::getFields( $gid, false, CRM_Core_Action::VIEW );

to:
$fields = CRM_Core_BAO_UFGroup::getFields( $gid, false, CRM_Core_Action::VIEW, null, null, false, null, true );

As you know, this makes the $skipPermissions variable true (rather than the default false) in the getFields call... which avoids the issue we were having. Please let me know if there is a better solution, he's currently on CiviCRM 3.1.1 FWIW.

Thank you.

Lew

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can't send emails for new profiles
February 16, 2010, 08:40:56 pm
Lew - I just ran some tests on my 3.1.2 local install - and the way I get that error is if anonymous users do NOT have the 'profile view' permission. This is because we redirect to profile/view after the form is submitted. I did not see any errors related to the "Notify when profile submitted" profile setting - so I'm wondering whether the failure and success 'cases' you're tracking have to do with whether the form is submitted by a logged in user / someone w/ different permissions.
Protect your investment in CiviCRM by  becoming a Member!

lewayotte

  • Guest
Re: Can't send emails for new profiles
February 16, 2010, 09:23:46 pm
He was also having trouble with email enabled registrations forms. I had to change line 1057 of CRM/Event/BAO/Event.php to
$fields = CRM_Core_BAO_UFGroup::getFields( $gid, false, CRM_Core_Action::VIEW, null, null, false, null, true );


I was testing using both Anonymous and Admin (logged in) users. Apart from setting "profile view" in the Core ACL for the "Any Role" is there another place I need to be checking?

I'll try to upgrade him to 3.1.2 to see if that alleviates anything.

Thank you.
Lew

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Can't send emails for new profiles
February 17, 2010, 09:43:00 pm
Lew - I'm not clear why you should need to change these lines of code 'for our site in particular' - unless these are truly bugs. if you think these two changes are needed bug fixes - then please file an issue or issues for them w/ detailed description of how to recreate the bug(s) and what specific data/environment condition(s) trigger it.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Can't send emails for new profiles

This forum was archived on 2017-11-26.