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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded from 3.2 to 3.4 now custom name badge template not found
Pages: [1]

Author Topic: Upgraded from 3.2 to 3.4 now custom name badge template not found  (Read 1301 times)

isabisa

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.92
  • PHP version: 5.3.6
Upgraded from 3.2 to 3.4 now custom name badge template not found
July 25, 2011, 11:54:35 am
I just upgraded from version 3.2 to 3.4 and my custom name badges aren't working anymore. I am getting the following errors:

  • warning: include_once(CRM/Event/Badge/AFLE.php) [function.include-once]: failed to open stream: No such file or directory in /home/theafle/public_html/sites/all/modules/civicrm/CRM/Event/Form/Task/Badge.php on line 174.
  • warning: include_once() [function.include]: Failed opening 'CRM/Event/Badge/AFLE.php' for inclusion (include_path='.:/home/theafle/public_html/sites/all/modules/civicrm:/home/theafle/public_html/sites/all/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home/theafle/public_html/sites/all/modules/civicrm/CRM/Event/Form/Task/Badge.php on line 174.

I believe the proper naming convention for name badge templates in version 3.2 was <template path>/CRM/Event/Badge/AFLEbadge.php for a class with the name CRM_Event_Badge_AFLE (I'm just assuming, based on the fact that that is working on my live site that is still running 3.2).

So I renamed the file to AFLE.php. I had problems loading the custom templates for EventInfo.php when I first upgraded and so I deleted the template cache in sites/default/files/civicrm/templates_c. This didn't fix the above error though.

I did some hunting in the forums and am completely stumped. As per this topic (http://forum.civicrm.org/index.php?topic=19118.0), I've checked the following:
The directories for my name badge template are all 755 and the file is 644.
My class name is CRM_Event_Badge_AFLE and the file is located at: <template path>/CRM/Event/Badge/AFLE.php
I've cleared the templates cache and the Drupal cache.
My other templates in <template path>/CRM/Event/Page are loading fine.

Any help is greatly appreciated! (Even if it's pointing out a stupidly simple error on my part. Actually, at this point, ESPECIALLY if it's a stupidly simple error on my part. I've been banging my head for a little to long on this one).

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 25, 2011, 04:16:12 pm
Based on this post, it seems like things are correct:
http://forum.civicrm.org/index.php?topic=20779.0

You can debug things by adding these 2 lines in CRM/Event/Form/Task/Badge.php just below line 173 (this will spit out the path / file that is failing on the require_once statement).
Protect your investment in CiviCRM by  becoming a Member!

isabisa

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.92
  • PHP version: 5.3.6
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 26, 2011, 06:04:39 am
I'm sorry, what 2 lines should I add?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 26, 2011, 09:16:20 am
Oops forgot to paste that in - sorry:
Code: [Select]
crm_core_error::debug('$classFile', $classFile);
exit();
Protect your investment in CiviCRM by  becoming a Member!

isabisa

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.92
  • PHP version: 5.3.6
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 26, 2011, 09:47:15 am
Thanks. Here is the output:

$classFile
CRM/Event/Badge/AFLE.php

It's not giving me the full path. Is there a way to know if this is looking for the above directory structure in my template directory or if it's looking somewhere in the CiviCRM module directory instead? Or is is really just looking in the root directory for this directory structure?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 26, 2011, 10:36:13 am
I'm thinking the doc is wrong since require_once and include_once both generally use paths relative to codebase root (so not the template directory). I was a bit puzzled about why folks had described putting .php files in the templates path ??

So maybe try:
1. Put your AFLE.php file directly in the codebase path initially (<civicrm_root>/CRM/Event/Badge directory). See if that works.
2. If that works, define a custom PHP directory (Global Settings > Directories) and put it in <custom_php_dir>/CRM/Event/Badge directory.
3. If that works, pls add a section to the doc which explains the setup process: http://wiki.civicrm.org/confluence/display/CRMDOC40/Name+Badge+Administration%2C+Customization
Protect your investment in CiviCRM by  becoming a Member!

isabisa

  • I’m new here
  • *
  • Posts: 12
  • Karma: 1
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.92
  • PHP version: 5.3.6
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
July 26, 2011, 12:47:02 pm
Defining a custom PHP directory worked, and I put my file there. I updated the documentation to clarify things. Thanks for all your help!

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Upgraded from 3.2 to 3.4 now custom name badge template not found
May 10, 2013, 02:21:57 pm
Upcoming MIH for CiviCRM 4.4

http://civicrm.org/make-it-happen#Self service view, update and cancel for CiviEvent and better event badges
 
Make it Happen (MIH) campaigns are the best way to get the new features you are looking for into CiviCRM.
If you wanna push this forward, please consider contributing to make this happen.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded from 3.2 to 3.4 now custom name badge template not found

This forum was archived on 2017-11-26.