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 (Moderator: Dave Greenberg) »
  • WSOD on Event and Contribution configuration pages
Pages: [1]

Author Topic: WSOD on Event and Contribution configuration pages  (Read 718 times)

Spry_Julia

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
WSOD on Event and Contribution configuration pages
November 18, 2014, 12:59:38 pm
UPDATE: real issue is a WSOD on our production server environment ONLY when trying to view Event and Contribution configuration screens. See further posts for details.

******************

Ever since we upgraded to 4.5.x, we have had issues with profile selection on Contribution configuration and Event configuration screens. This only happens in our live environment -- our local and dev environments are functioning correctly.

Here is a screenshot of the Profiles tab when configuring a Contribution page, for example:

https://www.dropbox.com/s/klze8ktudmstzfu/Screenshot%202014-11-18%2014.46.04.png?dl=0

As you can see, the dropdown list just says "Title" repeatedly.

Here is everything I know so far:
* there are no javascript errors
* there are no apache or other server errors. All loaded elements are reporting 200, as are all ajax calls that are issued after the page is rendered.
* there are no mod_security errors (I have run into mod_security errors with Civi before). Really, there seem to be no errors of any kind.
* each option that says "Title" corresponds to a configured profile. The value of each option has the correct id. But, rather than displaying the profile name, it just says "Title".
* if you look at the html source, the profile information is in the var CRM array.

The production server is a CentOS server, with CPanel/WHM. The dev and local environments are vanilla Apache running on Ubuntu.

I have been pouring over the code in crm.profile-selector.js, but haven't come up with any ideas of what could be happening. Any help or suggestions would be welcome. Thanks!
« Last Edit: November 18, 2014, 03:48:52 pm by Spry_Julia »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Issue with profile selection in Contributions and Events
November 18, 2014, 01:08:34 pm
Are there any tpl overrides or incompatible extensions?
Try asking your question on the new CiviCRM help site.

Spry_Julia

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Issue with profile selection in Contributions and Events
November 18, 2014, 02:06:19 pm
Ah, yes. I forgot about one VERY important override.

When we upgraded to 4.5, we did it quickly without as much testing as normal. After the upgrade, we noticed that we were getting white screens of death when trying to configure an Event page or Contribution page. We found that if we edited ProfileTemplates.tpl in templates/CRM/UF/Page, and removed the following lines, the issue went away:

<%= _view.getRequiredMarker() %>

<span class="crm-designer-field-binding"><%= _view.getBindingLabel() %></span>

We discovered this because the following errors were logged:

Javascript error: Uncaught ReferenceError: CRM is not defined

Apache errors:
Call to undefined function getRequiredMarker() in ...
Call to undefined function getBindingLabel() in ...

All paths looked ok, and no amount of cache clearing fixed the issue.

I had forgotten about it, but in order to isolate the issue with the missing Profile names, we installed a vanilla Civi website on our production server and loaded the demo Civi data. Once I remove those lines of code, the configure pages work, but the Profile labels don't work. The version of Civi is 4.5.3.

So, I probably can guess why the labels aren't working :) BUT, that brings me back to the WSOD when I add those lines back.
« Last Edit: November 18, 2014, 02:08:48 pm by Spry_Julia »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Issue with profile selection in Contributions and Events
November 18, 2014, 02:16:30 pm
I suggest you remove your tpl overrides and upgrade to the latest version of 4.5. There have been a couple of Drupal 6 regressions fixed recently.
Try asking your question on the new CiviCRM help site.

Spry_Julia

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: Issue with profile selection in Contributions and Events
November 18, 2014, 02:18:36 pm
Sorry, I rambled and wasn't very clear in my reply.

I am able to reproduce the WSOD on a brand new install of CiviCRM (4.5.3) on Drupal 7, using the demo Civi data. There are no tpl overrides or extensions.


Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: WSOD on Event and Contribution configuration pages
November 18, 2014, 05:47:10 pm
Ah, D7. Your profile suggests D6.

WSOD seems pretty unlikely for a javascript bug. Unless there is some sort of smarty parse error going on.
I suggest that on that brand-new site you turn on debugging and also turn on PHP error display so the white screen will show up with something useful.
Try asking your question on the new CiviCRM help site.

Spry_Julia

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: WSOD on Event and Contribution configuration pages
November 18, 2014, 07:02:05 pm
So, the PHP errors are:

PHP Fatal error:  Call to undefined function getRequiredMarker() in /home/.../public_html/sites/default/files/civicrm/templates_c/en_US/%%89/896/89673E6E%%ProfileTemplates.tpl.php on line 64

If I comment out <%= _view.getRequiredMarker() %> in  ProfileTemplates.tpl, I then get

PHP Fatal error:  Call to undefined function getBindingLabel() in /home/.../public_html/sites/default/files/civicrm/templates_c/en_US/%%89/896/89673E6E%%ProfileTemplates.tpl.php on line 64

This makes me think there is an error in setting _view, but I am having a really hard time debugging this, since it seems to be set in crm.designer.js. I can't set a breakpoint there with my IDE, but it's clearly failing on the server.

Thanks for your help!


Spry_Julia

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: WSOD on Event and Contribution configuration pages
November 18, 2014, 09:33:28 pm
I figured it out!

There is a PHP setting called asp_tags. The PHP config on my production server was "On" for this setting. So, PHP was trying to interpret the underscore tags as ASP tags. I don' know why it was turned on (we've never hosted any ASP sites), but I'm guessing this could come up for others on servers provisioned by some hosting companies (VPS servers, shared hosting, etc).

This article pointed me in the right direction: http://stackoverflow.com/questions/22272653/500-server-error-on-underscore-js-template-tag

Thanks!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: WSOD on Event and Contribution configuration pages
November 19, 2014, 06:08:14 am
Nice work. Hopefully this will help others who stumble across the issue.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • WSOD on Event and Contribution configuration pages

This forum was archived on 2017-11-26.