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 snippet is inert
Pages: [1]

Author Topic: profile snippet is inert  (Read 421 times)

Masked Marauder

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 1
  • \__^..^
  • CiviCRM version: 4.5.5
  • CMS version: drupal-6.34
  • MySQL version: 5.5.40-36
  • PHP version: 5.4.34
profile snippet is inert
April 10, 2014, 07:44:32 am
I'm trying to make a volunteer intake form that can be cut&pasted into any 3rd party website.  Nothing exotic, just four simple fields.

I'm using CiviCRM 4.4.4.  The ultimate host is a drupal6 host.  The overall D6/CiviCRM works fine on that host and the intake form works fine there also.  But, when I try to embed the snippet into a simple test site (a plain old 'Hello world' raw HTML file), nothing happens.

One problem is that all .js & .css links were referenced to '/sites/all/modules/civicrm/...'.   None of which loaded since the directories and files don't exist on the off-site server I'm using for the test.  They all load from the CiviCRM host with no errors or omissions after I prepend 'http://realhostname.org' to all such links though.  But then nothing still happens.  Inspecting the rendered DOM in firebug shows no change in any element; the form never materializes.  If I put an 'alert();' in the script block with cj() it pops up properly so i know that everything is being seen & interpreted by the browser.

I'm guessing the js isn't getting triggered on page load.  I see where the snippet has a local script with "cj(document).ready(function()..." in it and I suppose that's supposed to initialize the whole shebang, but who/what is supposed to invoke the invoker of cj()?

Its been a long time since I had to hack raw js/html and I suspect I'm one Duh! insight away from success.  What am I missing?

Masked Marauder

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 1
  • \__^..^
  • CiviCRM version: 4.5.5
  • CMS version: drupal-6.34
  • MySQL version: 5.5.40-36
  • PHP version: 5.4.34
Re: profile snippet is inert
April 11, 2014, 08:45:18 am
Problem (almost) solved.

I finally got around to checking out the server log and saw:
Quote
[11-Apr-2014 08:20:02] PHP Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home1/cdanewpo/public_html/firebare/sites/all/modules/civicrm/CRM/Core/DAO.php on line 1327

Change the '::' to '->' and its working now.

Almost.  All of the URIs still need to have the host name prepended manually or the standalone won't work on a far site.

Another irksome thing is that the CiviCRM preview presents the form elements in a table and it looks nice.  But, the generated snippet has no enveloping table and the snippet CSS files set the div heights to 100% so that the form explodes on the page.  Is the snippet rendering thingie skipping an entableing step?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • profile snippet is inert

This forum was archived on 2017-11-26.