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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Snippet type is unrecognized
Pages: [1]

Author Topic: Snippet type is unrecognized  (Read 1288 times)

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Snippet type is unrecognized
March 27, 2014, 01:32:30 pm
I just got this error in 4.44 from a Drupal site that was previously working OK... now the site is dead and I can go no further...I cleared Drupal caches, and template_c folder but still the same problem.  Here's the trace....ideas?  (A similar problem occurred with a Wordpress install - see http://forum.civicrm.org/index.php/topic,31338.0.html but the fix was to install 4.44!).

Mar 27 17:35:52  [info] $Fatal Error Details = Array
(
    [message] => Snippet type  is unrecognized
   =>
)
=>
)


Mar 27 17:35:52  [info] $backTrace = #0 /home/donation/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(322): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/donation/public_html/sites/all/modules/civicrm/CRM/Core/Region.php(198): CRM_Core_Error::fatal("Snippet type  is unrecognized")
#2 /home/donation/public_html/sites/all/modules/civicrm/drupal/civicrm.module(191): CRM_Core_Region->render("")
#3 /home/donation/public_html/includes/common.inc(5741): civicrm_page_build((Array:7))
#4 /home/donation/public_html/includes/common.inc(2675): drupal_render_page("\n\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"...")
#5 /home/donation/public_html/includes/common.inc(2563): drupal_deliver_html_page("\n\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"...")
#6 /home/donation/public_html/includes/menu.inc(532): drupal_deliver_page("\n\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"...", "")
#7 /home/donation/public_html/index.php(21): menu_execute_active_handler()
#8 {main}[/i]
Andy Clark

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 10:46:01 am
I got that as well, and I'm unsure what caused it or how to proceed.  I've restored both the software itself, the entire web account and the databases, but I can't get into civicrm to see any settings.  I've tried an upgrade, but that didn't work either (prior to the restore).  I turned on verbose logging and it looks like the errors are related to the following lines of code:

Notice: Undefined index: type in CRM_Core_Region->render() (line 198 of ...sites/all/modules/civicrm/CRM/Core/Region.php).

and

Notice: Undefined index: type in CRM_Core_Region->render() (line 158 of /home/justice/public_html/sites/all/modules/civicrm/CRM/Core/Region.php).

This makes sense because the Region.php deals with the Smarty snippets (or so it appears).

I took a look at the upgraded versions Region.php and the only difference in that block of code is this:

OLD Version:
case 'callback':
          $args = isset($snippet['arguments']) ? $snippet['arguments'] : array(&$snippet, &$html);
          $html .= call_user_func_array($snippet['callback'], $args);
          break;

NEW Version
 case 'callback':
          $args = is_array($snippet['arguments']) ? $snippet['arguments'] : array(&$snippet, &$html);
          $html .= call_user_func_array($snippet['callback'], $args);
          break;

I don't know if that makes a difference, but it's a real problem, as we're two weeks out from an event that is contained in Civicrm and we still have registrations to process.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 29, 2014, 11:27:23 am
Might this possibly be a hosting environment problem? I don't get this problem at another host running exactly the same software (Drupal 7.26 and Civi 4.44).  Suggestions, anyone?
Andy Clark

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 11:30:46 am
I am open to anything, but my version of civicrm has run without issue for 2 years.  Then all of the sudden...

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 11:38:05 am
I don't know if you have error logging, or the messaging turned on, but mine is consistently the Region.php file kicking the error, always line 158 and 198.  I have no idea how to solve this, as it is way above my skill level to decipher.  Sadly, it s a complete break for the software, and I can't find any way in to work around it.  I cannot even install a new version, as it won't let me into the backend.  I am currently trying to install the civicrm_dbtools suite to try and see if that can tell me more, but I don't think it's db related, but software.  Something changed, that's for certain.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 29, 2014, 11:52:00 am
In my Drupal error log I get this (but this is only a warning?):

Notice: Undefined index: type in CRM_Core_Region->render() (line 198 of /home/donation/public_html/sites/all/modules/civicrm/CRM/Core/Region.php).

This site is has not been used at all since Feb 8th and was working OK.  But now - without any changes that I've made - it ain't working!  I will ask the hosting company what changes they've made since then. 
Andy Clark

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 11:56:27 am
That's my error too.  I checked with my hosting company, but nothing was changed, other than an increase in memory.  Additionally, I was getting white screens when trying to clear the cache, even when using drush.  Thank god I had an active admin session to change the logging.  Either way, it was a stable install for over a year, and then all of the sudden, it isn't.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 29, 2014, 12:03:59 pm
PHP on my site is 5.4.26 whereas on my working sites the level is 5.3.27.    Mysql is 5.1.73-cll on the offending site, and 5.1.61-cll on the working site.  What are your levels?

If any of the core team or any helpful gurus see this - both our systems here are at a dead stop - they are inaccessible.  I can use Drupal, but CiviCRM is dead.  We need help badly!
Andy Clark

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 01:32:43 pm
OK... SOLVED!!!

So, my issue turned out to be a piece of software called eAccelerator, that was installed my by managed server team to improve performance.  However, it had a conflict with civicrm.  Since we had ruled out the civicrm software, and the database, it had to be something in the environment.  They went back through their changes over the past day or so, and voila, found that guy.  Once disabled, it came right back.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 29, 2014, 01:53:51 pm
Well done! eAccelerator had caused a problem for me before at this installation, and the host had backed it out.  They must have put it back again.   Well done, indeed!
Andy Clark

strategery

  • I’m new here
  • *
  • Posts: 7
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.25
Re: Snippet type is unrecognized
March 29, 2014, 01:58:20 pm
I'm so happy to hear that, and if I hadn't been up pretty much all night trying to sort this little bugger out, I'd give you much more verbose congrats, but I think I'm going to go pass out!

I am so glad it worked for the both of us, that was a PAIN! I hope the developers can figure out the issue with eAccelerator and Region.php

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 29, 2014, 02:04:20 pm
Looking back at the fora, there are several references to eAccelerator causing problems,  e.g. one of mine http://forum.civicrm.org/index.php/topic,30387.msg130208.html#msg130208 and others.  I wonder whether there should be a notice somewhere to advise people of this problem?  Surely this is an avoidable problem?
Andy Clark

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: Snippet type is unrecognized
March 29, 2014, 03:26:30 pm

hey andy:

feel free to edit the wiki and add that warning. I think there is a warning already for xCache

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

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Snippet type is unrecognized
March 30, 2014, 01:15:51 am
I can confirm that disabling eAccelerator fixed the problem - and I will update the wiki.
Andy Clark

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Snippet type is unrecognized

This forum was archived on 2017-11-26.