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 »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Event registration form won't display without PHP error
Pages: [1]

Author Topic: Event registration form won't display without PHP error  (Read 3205 times)

alexeightsix

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: 3.5.1
  • MySQL version: latest
  • PHP version: latest
Event registration form won't display without PHP error
April 19, 2013, 12:47:25 pm
I'm receiving the following error when trying to embed the form via shortcode on my website (using twenty ten theme)

Warning: Cannot modify header information - headers already sent by (output started at /home/projects/public_html/xxxxxxx/wp-content/themes/twentytwelve/header.php:13) in /home/projects/public_html/xxxxx/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php on line 349

Digging into the code...

  static function redirect($url = NULL) {
    if (!$url) {
      $url = self::url('civicrm/dashboard', 'reset=1');
    }

    // replace the & characters with &
    // this is kinda hackish but not sure how to do it right
    $url = str_replace('&', '&', $url);
    //echo $url;
    header('Location: ' . $url);
    self::civiExit();
  }

I didn't modify the default theme, this issue happens on my own custom theme too. I disabled all plugins.

This issue has already been reported here: h t t p : / / issues.civicrm. o r g /jira/browse/CRM-10070

Thx
« Last Edit: April 19, 2013, 12:49:57 pm by alexeightsix »

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: Event registration form won't display without PHP error
April 19, 2013, 02:55:35 pm

I've been playing with shortcuts and wordpress earlier today and did not get the below error. This might be another plugin getting output before civi starts doing its work?

Sorry, dont have enough WP knowledge to know what to fix here. But we will be at the WP meetup in SF next wedneday, so if we can reproduce it, we can definitely get some advice and fix 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

siriusly

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress 3.5.2
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Event registration form won't display without PHP error
August 05, 2013, 12:16:27 pm
I found a workaround... see this post:

http://forum.civicrm.org/index.php/topic,29625.msg126898.html#msg126898
« Last Edit: August 06, 2013, 11:31:40 pm by siriusly »

siriusly

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress 3.5.2
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Event registration form won't display without PHP error
August 06, 2013, 04:50:58 pm
I can reproduce this on two different installs, and may have found a couple more clues as to why this is happening, but cannot figure out a solution.  Please see these two posts:

http://forum.civicrm.org/index.php/topic,29625.0.html

http://forum.civicrm.org/index.php/topic,29577.msg126729.html#msg126729

Hope this is helpful to someone who is more knowledgeable than I.

jfewell

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Wordpress 3.6
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Event registration form won't display without PHP error
September 04, 2013, 09:06:18 am
I'm also having this issue. I tried the workaround also, no dice.
« Last Edit: September 04, 2013, 10:57:00 am by jfewell »

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: Event registration form won't display without PHP error
September 05, 2013, 08:32:51 am
We had this too. I never found a fix, but we've been running with it for 6 months and as far as I can tell it doesn't actually break anything. I turned off PHP errors being displayed and all's been fine.

jfewell

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Wordpress 3.6
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Event registration form won't display without PHP error
September 05, 2013, 09:53:48 am
But the CiviEvent registration shows up on your installation? It does not show up for me, the shortcode just produces the php error. I don't understand how hiding the error message would help with displaying the event registration page.

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: Event registration form won't display without PHP error
September 05, 2013, 10:15:04 am

2 things:

a. Can you disable all WP plugins and see if that fixes it

b. Can you do a super simple vanilla install civi / wp and see if it happens on that install

thx

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 »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Event registration form won't display without PHP error

This forum was archived on 2017-11-26.