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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM Content is not displayed inside template
Pages: [1]

Author Topic: CiviCRM Content is not displayed inside template  (Read 717 times)

mnsearch

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.7.1
  • MySQL version: 5.0.10
  • PHP version: 5.4.20
CiviCRM Content is not displayed inside template
November 21, 2013, 09:37:10 am
Very strange, and we can't figure it out. When you go to our Membership signup page:

http://www.mnsearch.org/membership/member-signup/

The CiviCRM form shows up just fine, exactly where we want it to, inside the box on our page. But if you hit contribute (you don't even need to fill anything out) it forwards to a url with some variable

http://www.mnsearch.org/membership/member-signup/?page=CiviCRM&q=civicrm/contribute/transact

Which I assume is normal. The abnormal part is on this second page, the CiviCRM content is displayed above our template. You have to see it to actually see what I'm describing. I'm assuming what's happening is there's some javascript that's telling the CiviCRM code where to append itself, and it's not working.

Any help would be greatly appreciated! 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: CiviCRM Content is not displayed inside template
November 21, 2013, 12:00:01 pm

i'm not sure how/where u get the string "membership/member-signup"

i would get civi to work on your base page, ie.

http://www.mnsearch.org/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1

once you are happy with that flow, then you can create a civi frontend page and set it here:

http://wordpress.demo.civicrm.org/wp-admin/?page=CiviCRM&q=civicrm/admin/setting/uf&reset=1

and stick to using just one string. Civi is a bit picky about the url name/structure

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

mnsearch

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.7.1
  • MySQL version: 5.0.10
  • PHP version: 5.4.20
Re: CiviCRM Content is not displayed inside template
November 25, 2013, 07:01:17 am
Quote
i'm not sure how/where u get the string "membership/member-signup"

I just created a page and put the shortcode in that page. That's easy enough to do, as it should be since shortcode functionality is supported. But then why doesn't the civi code remain in the template after I hit contribute.

I've attempted to set up the base page, but can't get it to work correctly. Civi is frustrating and slow. I'm sure I'll figure it out eventually, but I thought maybe someone else had this issue and could help correct it easily.

PS: what's with having to enter 3 different captcha questions just to post a reply when I'm already logged in here?

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: CiviCRM Content is not displayed inside template
November 25, 2013, 09:16:33 am

i dont think civi deal with WP permanlinks in a very nice manner and that might be causing the issue.

can you try switching to the default permanlinks: http://wp/?p=123

and see if that works better. We would love for some WP developers to help us figure out and improve in the way we handle WP permanlinks. We have not figured out (as yet) how to work with all the different combinations of wp permalinks and hence the issues (i think)

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

mnsearch

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.7.1
  • MySQL version: 5.0.10
  • PHP version: 5.4.20
Re: CiviCRM Content is not displayed inside template
November 25, 2013, 11:55:32 am
I switched to default permalinks and the same issue.

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: CiviCRM Content is not displayed inside template
November 25, 2013, 11:58:29 am

can you try and reproduce your issues on wordpress.demo.civicrm.org

thanx

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

mnsearch

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.7.1
  • MySQL version: 5.0.10
  • PHP version: 5.4.20
Re: CiviCRM Content is not displayed inside template
November 26, 2013, 07:06:17 am
I cannot replicate that on your demo site, but then again, I cannot load my Theme into that site either to see if there's an issue there.

mnsearch

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.7.1
  • MySQL version: 5.0.10
  • PHP version: 5.4.20
Re: CiviCRM Content is not displayed inside template
December 07, 2013, 07:38:56 am
So the reason the page was displaying the CiviCRM code outside the template was because on that particular page I was using the shortcode. When it went to process the form, it was using that same page template, so it was duplicating the form on that page, which appears to confuse the heck out of CiviCRM. This is definitely a bug that should be looked into I think. Otherwise why would you offer the ability to use the shortcode to put the form on the page only to have it screw up, because you are using the shortcode?

Anyhow, I updated the page manually in the wordpress.php (civicrm\civicrm\CRM\Utils\System\WordPress.php) to this

Code: [Select]
   
if ((is_admin() && !$frontend) || $forceBackend) {
      $base .= 'wp-admin/admin.php';
    }
    else {
      $base .= 'membership/';
    }

So now it works at least. I just have to use this ugly url:

http://www.mnsearch.org/membership/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1



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: CiviCRM Content is not displayed inside template
December 07, 2013, 01:54:46 pm

any chance u can research this a bit more and submit a generic patch that works for all WP instances (i.e. does not hardcode your short url: membership)

i think u use the shortcode to display the inital page. all future pages are done under the civi url

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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM Content is not displayed inside template

This forum was archived on 2017-11-26.