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 webform page - The requested Profile (gid=) is disabled
Pages: [1]

Author Topic: Profile webform page - The requested Profile (gid=) is disabled  (Read 2352 times)

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Profile webform page - The requested Profile (gid=) is disabled
June 17, 2011, 09:02:18 pm
After upgrading from 3.0.x to 3.4.x, a webform created by a profile stopped working and is spitting out this error after hitting the "Save" button. Looking around the forums, it is not a common one but I am not able troubleshoot it.
Included are the Joomla debug codes.

Any ideas would be helpful.
Thanks in advance.

Bruce


Code: [Select]
Sorry. A non-recoverable error has occurred.
The requested Profile (gid=) is disabled, OR there is no Profile with that ID, OR a valid 'gid=' integer value is missing from the URL. Contact the site administrator if you need assistance.

Return to home page.

Call stack
# Function Location
1 JSite->dispatch() /var/www/vhosts/dogpacsf.org/httpdocs/index.php:68
2 JComponentHelper->renderComponent() /var/www/vhosts/dogpacsf.org/httpdocs/includes/application.php:124
3 require_once() /var/www/vhosts/dogpacsf.org/httpdocs/libraries/joomla/application/component/helper.php:162
4 civicrm_invoke() /var/www/vhosts/dogpacsf.org/httpdocs/components/com_civicrm/civicrm.php:24
5 CRM_Core_Invoke::invoke() /var/www/vhosts/dogpacsf.org/httpdocs/components/com_civicrm/civicrm.php:86
6 call_user_func() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:190
7 CRM_Core_Invoke::profile()
8 CRM_Utils_Wrapper->run() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:341
9 CRM_Core_Controller->run() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php:115
10 HTML_QuickForm_Page->handle() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php:284
11 HTML_QuickForm_Controller->handle() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
12 CRM_Core_QuickForm_Action_Next->perform() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
13 CRM_Core_StateMachine->perform() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:64
14 CRM_Core_Form->buildForm() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php:143
15 CRM_Profile_Form_Edit->preProcess() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php:325
16 CRM_Core_Error::fatal() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Profile/Form/Edit.php:114
17 JError::raiseError() /var/www/vhosts/dogpacsf.org/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php:306
18 JError::raise() /var/www/vhosts/dogpacsf.org/httpdocs/libraries/joomla/error/error.php:171
19 JException->__construct() /var/www/vhosts/dogpacsf.org/httpdocs/libraries/joomla/error/error.php:136
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
June 17, 2011, 11:45:41 pm
After playing around with this a little more, in the Profile Manager, if I choose from the 'more' drop-down in the right-most column of the desired profile to "Create" then the appropriate URL appears and it does work. But then if I create a menu item with SEF activated choosing CiviCRM -> Profile -> Create then it doesn't pick up the profile I chose in the Parameters drop-down.

There must be a call broken between the Joomla menu system and CiviCRM with regards to picking up the correct URL.

In the meantime, I am using the lengthy URL from the Profile Manager.

Please advise.
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
June 18, 2011, 05:46:00 pm
I am very annoyed that you moved this referring to it as Drupal issue when this is specifically a Joomla installation. Please correct this immediately.
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Profile webform page - The requested Profile (gid=) is disabled
June 19, 2011, 03:00:58 am
Hi - i know nothing about the thread being moved etc - but just wanted to point out that first time i read this subject of this i presumed you were referring to the Webform (drupal module) integration work that has been moving at speed over the last few months - so the subject may have confused others.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
June 19, 2011, 08:58:49 pm
If you look at the particulars under my handle to the left, you'll see that I am using Joomla, not Drupal.

I would appreciate the discussion be moved to, at least, the Joomla section then.

Bruce
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Profile webform page - The requested Profile (gid=) is disabled
June 20, 2011, 12:01:51 pm
Hey Bruce - I think the current location - "Using Profiles" - is probably the correct board for this issue. The error message indicates that the Profile ID (gid=) is not getting passed with the request to load the profile form.

Quote from: bmw on June 17, 2011, 11:45:41 pm
But then if I create a menu item with SEF activated choosing CiviCRM -> Profile -> Create then it doesn't pick up the profile I chose in the Parameters drop-down.

What happens if you create a menu item for your profile with SEF NOT activated? Also, just to be sure we understand the issue ... sounds like the Profile create form loads ok using the menu item, but you get an error when trying to save the form. Is this correct?
Protect your investment in CiviCRM by  becoming a Member!

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
June 20, 2011, 01:13:26 pm
Quote from: Dave Greenberg on June 20, 2011, 12:01:51 pm
Hey Bruce - I think the current location - "Using Profiles" - is probably the correct board for this issue. The error message indicates that the Profile ID (gid=) is not getting passed with the request to load the profile form.

Thanks, Dave. Let's see if we can get through this here and I'll post it 'Solved' with an abridged version later in that location.
Let's get started...

Quote from: bmw on June 17, 2011, 11:45:41 pm
But then if I create a menu item with SEF activated choosing CiviCRM -> Profile -> Create then it doesn't pick up the profile I chose in the Parameters drop-down.

Quote from: Dave Greenberg on June 20, 2011, 12:01:51 pm
What happens if you create a menu item for your profile with SEF NOT activated?

First off, all caching is turned off. In the profile's settings, I have the 'Redirect URL' and 'Cancel Redirect URL' settings left blank.

This menu link gets created and the form does appear: http://example.org/index.php?option=com_civicrm&view=Profiles&Itemid=8
After entering data into the form and clicking the 'Save' button, I get this URL with the error message:
http://www.example.org/index.php?option=com_civicrm&task=civicrm/profile/create&Itemid=8

Now, one thing I notice here is that in the processed menu link that Joomla creates the prefix 'www' is missing but appears in the resulting error message after CiviCRM processing. If I add the prefix 'www' to the menu link and then try letting CiviCRM process the web form, it just takes me back to the home page but if I click on the menu link again, I get the acknowledgment that the entry has been made but also the form appears again which according to the tool tips in the profile's settings section 'Redirect URL' is correct behavior1. I had this working perfectly up through v3.2.4. After that it behaved like this going back to the home page.

Next, in the Joomla configuration.php file, I had left the $livesite URL blank. I then filled it with 'http://www.example.org' and tried it again. Now, the menu link has the prefix 'www' appearing but the same behavior as before.

Next, I turn SEF back on. Hmmm, same behavior. The entry gets recorded into the database but returns to the homepage and not to the the "Thank you" confirmation page. Again, clicking on the menu item again, I get the confirmation "Thank you" message above a new blank web form.



Quote from: Dave Greenberg on June 20, 2011, 12:01:51 pm
Also, just to be sure we understand the issue ... sounds like the Profile create form loads ok using the menu item, but you get an error when trying to save the form. Is this correct?

Yes, this was correct up to the point that I entered in the site's URL into Joomla configuration.php's $livesite setting. Then once it had the prefix 'www' in the menu link it finally was writing to the database. Seems kinda odd since the call is made when you click on the 'Save' button but in any case, it is writing to it now with the same behavior that after processing, it returns to the homepage, then clicking on the menu link again shows the confirmation above a new blank form.

Now, would there have been any settings in the backend of CiviCRM that could have gotten defaulted from the upgrade to 4.0.x? If so, where should I start looking? I've already checked both civicrm.settings.php under Administrator/Components/com_civicrm and the webroot/Components/com_civicrm. Site URLs and tokens are contained correctly.

What's next?

Thanks, Dave.

Footnotes:
1. (edited 06/20/2011 @ 14:33:00 PDT (-0700 UTC))
« Last Edit: June 20, 2011, 02:34:14 pm by bmw »
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
June 20, 2011, 02:38:25 pm
Dave,
I am wondering if this situation is anything similar to another posting http://forum.civicrm.org/index.php/topic,10766.msg46323.html#msg46323
where you replied that the call for Joomla was unknown.

Let me know if this was fixed subsequently and, if so, if you have a bug report number maybe we can track it down that way and see if there is a typo or omission somewhere in the code.

Thanx
Bruce
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Profile webform page - The requested Profile (gid=) is disabled
June 21, 2011, 04:00:07 pm
Two guesses:
1. The fact that the base URL is changing is suspicious. The browser session is dependent on a stable URL (cookie is set for either www.example.com OR example.com - but not valid for both). So first thing is to check both copies of civicrm.settings.php file for base URL and make sure you have a consistent entry point that matches the settings in those files as well as the value you see when you go to Administer > Configure > Global Settings > Resource URLs

2. Might be permissions issue. There are specific permissions now for various profile operations (e.g. profile create, profile view, profile edit ...). Profile create form "wants" to redirect to profile/view after saving so if the front-end user (anonymous or whatever logged in role you're using) doesn't have that permission - it may throw this error. If that's it, it's bad behavior (should give a reasonable "access denied" message).
Protect your investment in CiviCRM by  becoming a Member!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Profile webform page - The requested Profile (gid=) is disabled
June 22, 2011, 11:16:39 am
Actually I'm pretty sure what you're seeing is a regression bug:
http://issues.civicrm.org/jira/browse/CRM-8326

... where view permission has been unintentionally blocked even if anonymous users have "view profile" permission. We are working on the fix and will be pushing out that fix with some other stuff (including a security patch) as 3.4.4 tomorrow (or Friday at the latest). Sorry it took me so long to put together the pieces :-(
Protect your investment in CiviCRM by  becoming a Member!

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Profile webform page - The requested Profile (gid=) is disabled
August 05, 2011, 09:40:23 pm
Very  good. Thanx.
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

e_mason

  • I post occasionally
  • **
  • Posts: 65
  • Karma: 1
  • Eliot Mason
  • CiviCRM version: 4.05
  • CMS version: Drupal 7
  • MySQL version: 5.1xx
  • PHP version: 3.53
Fixed in 4.05?
August 31, 2011, 08:12:00 am
I'm having a similar problem.  I've placed a profile in a Drupal page (using the HTML code snippet).  On submission I get the following error:
Quote
The requested Profile (gid=3) 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.

All profile permissions are set for anonymous+.

The same profile used in Civi as a "Create Profile" works fine.

The "gid=3" is weird... this profile has a gid=12 (and that's what's in the script code).

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Profile webform page - The requested Profile (gid=) is disabled
December 05, 2011, 03:23:45 pm
I have just been debugging this &

Quote
Might be permissions issue. There are specific permissions now for various profile operations (e.g. profile create, profile view, profile edit ...). Profile create form "wants" to redirect to profile/view after saving so if the front-end user (anonymous or whatever logged in role you're using) doesn't have that permission - it may throw this error. If that's it, it's bad behavior (should give a reasonable "access denied" message).

seemed to be the answer. So there might be a 'bad behaviour' that needs to be remedied

NB - re Mason's post - separate issue - see http://issues.civicrm.org/jira/browse/CRM-8575
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Profile webform page - The requested Profile (gid=) is disabled
December 05, 2011, 03:53:48 pm
Hmm - removing the permission again didn't seem to re-break it.....

We did wind up finding a mollom related problem after that - not sure how closely related.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Profile webform page - The requested Profile (gid=) is disabled

This forum was archived on 2017-11-26.