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) »
  • Wordpress + Profiles/Forms + HTML Snippet
Pages: [1]

Author Topic: Wordpress + Profiles/Forms + HTML Snippet  (Read 1229 times)

isaac_wilder

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2a1
  • CMS version: WP 3.4.2
  • MySQL version: Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
  • PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch
Wordpress + Profiles/Forms + HTML Snippet
February 15, 2013, 12:00:22 pm
I am attempting to embed a form from a wordpress-powered civi install into a static html site. This is Civi 4.2.7 on Wordpress 3.5.1. I am able to generate the HTML snippet, and the the form appears correctly on the site. The action statement in the snippet is
<form  action="http://thefnf.org/index.php?page=CiviCRM&amp;q=civicrm/profile/create&amp;gid=17&amp;reset=1"  method="post" name="Edit" id="Edit" >

When I submit the form, I am directed to http://thefnf.org/index.php?page=CiviCRM&amp;q=civicrm/profile/create&amp;gid=17&amp;reset=1 - submission does not have any effect on user profile, nor does it send e-mail informing of completion. Post-completion redirect is set to <input name="postURL" type="hidden" value="newfront.thefnf.org/contact.html" />. Cancel URL is <input name="cancelURL" type="hidden"  value="http://thefnf.org/index.php?page=CiviCRM&amp;q=civicrm/profile&amp;reset=1&amp;gid=17" /> but I don't think that I'm landing there, as the order of terms in the url is reversed.

The form does work as intended when accessed via the wordpress passthrough method (ie. @ http://thefnf.org/volunteer/?page=CiviCRM&q=civicrm/profile/create&reset=1&gid=17 )

Let me know if there is any information I can provide to help with debugging, or if I'm making an obvious mistake somewhere.
« Last Edit: February 15, 2013, 12:27:31 pm by isaac_wilder »

isaac_wilder

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2a1
  • CMS version: WP 3.4.2
  • MySQL version: Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
  • PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch
Re: Wordpress + Profiles/Forms + HTML Snippet
February 15, 2013, 12:00:44 pm
Oh, and thanks!

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 + Profiles/Forms + HTML Snippet
February 15, 2013, 01:42:03 pm

can u try changing the action to:

<form  action="http://thefnf.org/index.php?page=CiviCRM&q=civicrm/profile/create&gid=17&reset=1

and see if that fixes it

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

isaac_wilder

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2a1
  • CMS version: WP 3.4.2
  • MySQL version: Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
  • PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch
Re: Wordpress + Profiles/Forms + HTML Snippet
February 16, 2013, 04:05:51 pm
No luck.

The form doesn't get submitted, and I end up at http://thefnf.org/index.php?page=CiviCRM&q=civicrm/profile/create&gid=17&reset=1 (which just appears as our index page). Same behaviour persists whether or not I am logged in to wordpress.

Any other ideas? Happy to take a run through the code, but I'm not at all sure where to start.

Thanks for you help, Lobo.

isaac_wilder

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2a1
  • CMS version: WP 3.4.2
  • MySQL version: Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
  • PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch
Re: Wordpress + Profiles/Forms + HTML Snippet
February 19, 2013, 09:37:17 am
Bump.

I'm more or less at a loss here. Does anyone know of a good tool to examine REST payloads? From the behaviour, that seems like it must be the issue.

Looking at the Apache logs, I see a 'POST' come in:
[19/Feb/2013:11:40:11 -0600] "POST /index.php?page=CiviCRM&q=civicrm/profile/create&gid=17&reset=1 HTTP/1.1" 200 10725 "http://newfront.thefnf.org/contact.html" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0"

followed immediately by some 'GET's:
[19/Feb/2013:11:40:19 -0600] "GET /wp-includes/js/admin-bar.min.js,qver=3.5.1.pagespeed.jm.Q1vu4eQpn0.js HTTP/1.1" 200 2645 "http://thefnf.org/index.php?page=CiviCRM&q=civicrm/profile/create&gid=17&reset=1" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0"

[19/Feb/2013:11:40:19 -0600] "GET /wp-content/uploads/2012/12/intro_keygrame.png HTTP/1.1" 404 3974 "http://thefnf.org/index.php?page=CiviCRM&q=civicrm/profile/create&gid=17&reset=1" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0"



imw
« Last Edit: February 19, 2013, 09:44:52 am by isaac_wilder »

isaac_wilder

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 4.2a1
  • CMS version: WP 3.4.2
  • MySQL version: Ver 14.14 Distrib 5.5.25a, for Linux (x86_64) using readline 5.1
  • PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch
Re: Wordpress + Profiles/Forms + HTML Snippet
February 19, 2013, 10:43:55 am
So, I was able to look at the POST content using Firebug:

Parameters application/x-www-form-urlencoded
_qf_Edit_next   Save
_qf_default   Edit:cancel
cancelURL   http://newfront.thefnf.org/contact.html
custom_4   test
email-Primary   imw@5400.co
first_name   test
last_name   test
note   test
postURL   http://newfront.thefnf.org/contact.html
recaptcha_challenge_field   03AHJ_VutkN27OdooO4E0SI1b8t-PP9hA1DuG41Qp3hg_a172fSHsAYF0UhwOhDV4JP_QIrC3kspDJy_eW4RdW2sYWUIYf9CXFZeGR0Ocpz0roRXftpUwiINTfOeHQaDrxfiWz0pXOZjtSQfZUQaGEzyW_vBDKojVu3MDvpIkAaaaPGQNVrlwbC-4
recaptcha_response_field   manual_challenge
recaptcha_response_field   339 pgsolds
Source
postURL=http%3A%2F%2Fnewfront.thefnf.org%2Fcontact.html&cancelURL=http%3A%2F%2Fnewfront.thefnf.org%2Fcontact.html&recaptcha_response_field=manual_challenge&_qf_default=Edit%3Acancel&first_name=test&last_name=test&email-Primary=imw%405400.co&custom_4=test&note=test&recaptcha_challenge_field=03AHJ_VutkN27OdooO4E0SI1b8t-PP9hA1DuG41Qp3hg_a172fSHsAYF0UhwOhDV4JP_QIrC3kspDJy_eW4RdW2sYWUIYf9CXFZeGR0Ocpz0roRXftpUwiINTfOeHQaDrxfiWz0pXOZjtSQfZUQaGEzyW_vBDKojVu3MDvpIkAaaaPGQNVrlwbC-4&recaptcha_response_field=339+pgsolds&_qf_Edit_next=Save


Thought I would share in case this could help debug. The response code, as you may have gathered from above, was 200.
« Last Edit: February 19, 2013, 10:46:05 am by isaac_wilder »

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 + Profiles/Forms + HTML Snippet
February 19, 2013, 10:45:31 am

for the short term your best bet would be to just use the civicrm profiles rather than standalone

if you would like to debug, you might want to start reading the developer book @ http://book.civicrm.org/developer/

ping us on irc if you need help getting 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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Wordpress + Profiles/Forms + HTML Snippet

This forum was archived on 2017-11-26.