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 »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Blank Pages returned for "New Email" under "Contacts" menu
Pages: [1]

Author Topic: Blank Pages returned for "New Email" under "Contacts" menu  (Read 1507 times)

chrislascelles

  • Guest
Blank Pages returned for "New Email" under "Contacts" menu
February 04, 2010, 10:42:30 am
Hi,

Just installed version 3.1.1 on drupal 6.15. All is well, except when I click on "New Email" under the "Contacts" menu, I get a blank page at the following url:

http://lascelles.us/crm/civicrm/activity/add&atype=3&action=add&reset=1&context=standalone

The same happen for New Activity, but not any other functions. 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: Blank Pages returned for "New Email" under "Contacts" menu
February 04, 2010, 11:12:01 am

please check your apache error log to get more details on the blank page error. please ask your hosting provider for access to this if u dont have 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

chrislascelles

  • Guest
Re: Blank Pages returned for "New Email" under "Contacts" menu
February 04, 2010, 11:48:30 am
Thanks,

Here is the error log:

[Thu Feb 04 13:51:48 2010] [error] [client 70.254.36.166] PHP Fatal error: Call to undefined function json_encode() in /srv/www/vhosts/lascelles.us/httpdocs/crm/sites/all/modules/civicrm/CRM/Contact/Form/Task/EmailCommon.php on line 172, referer: http://lascelles.us/crm/civicrm/admin/tag&reset=1&action=add

Much appreciated :)

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: Blank Pages returned for "New Email" under "Contacts" menu
February 04, 2010, 01:51:31 pm

would help if you did a web search on the error message:

http://www.google.com/search?q=PHP+Fatal+error%3A+Call+to+undefined+function+json_encode%28%29+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

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

chrislascelles

  • Guest
Re: Blank Pages returned for "New Email" under "Contacts" menu (Fixed!!!)
February 04, 2010, 06:08:41 pm
json support seems hit and miss, even if you have php 5.2 or newer. It seems php is often compiled without out is, such as on my opensuse 11.1 server.

Happily,  :) I found a decent workaround that worked for me:

1. Go to http://www.boutell.com/scripts/jsonwrapper.html and get the gzipped tarfile as indicated. The instructions on the boutell site were not super clear for newbies, so those below may help guide you.
2. Untar the file (get 7zip program if you need help untarring and extracting the file)
3. From the unzipped file, put the JSON folder and the two files jasonwrapper.php and jasonwrapper_inner.php into a new directory such as json_fix. Make a note of the root path of the jasonwrapper.php file e.g. /srv/www/vhosts/yourdomain.org/httpdocs/crm/json_fix/jsonwrapper.php
4. Add...     require_once '/srv/www/vhosts/yourdomain.org/httpdocs/crm/json_fix/jsonwrapper.php'; (replace with your domain and root path) ...to the top of the following files:
a) crm/sites/all/modules/civicrm/CRM/Contact/Form/Task/EmailCommon.php
b) crm/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php
c) crm/sites/all/modules/civicrm/CRM/Activity/Form/Activity.php
d) crm/sites/all/modules/civicrm/CRM/Admin/Form/MessageTemplates.php

or any others that give the same problem (as indicated by the error log on your server).

Hope this helps someone else needing a fairly simple, if not completely optimal, fix.

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: Blank Pages returned for "New Email" under "Contacts" menu
February 04, 2010, 07:15:28 pm

not sure if this is the best solution. hacking core files is not recommended

can't u build php with json support on opensuse? maybe the php5-json RPM?

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

chrislascelles

  • Guest
Re: Blank Pages returned for "New Email" under "Contacts" menu
February 05, 2010, 02:04:59 pm
Yes, this is certainly not good practice for any production implementation. Please, nobody consider the hack above a real "solution".

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Blank Pages returned for "New Email" under "Contacts" menu

This forum was archived on 2017-11-26.