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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Templates Ignored
Pages: [1]

Author Topic: Custom Templates Ignored  (Read 898 times)

jbertolacci

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
Custom Templates Ignored
July 22, 2011, 05:43:20 pm
I have two separate drupal/civicrm (3.2.3) sites for two sister organizations running on one server using separate apache vhosts and databases. All is working well except I just noticed that some minor, but important custom templates (and php files?) are being ignored by one of the sites. Both sites are running the same custom php and templates (living in different directories obviously). Here is what I have tried:

  • I have confirmed I am modifying the right template files
  • Global Settings > Directories point to the correct custom directories
  • The permissions look fine on the directories
  • I have deleted the contents of the templates_c directory
  • Temporarily changing Global Settings > Directories to point to the files successfully being used by the other site changed nothing

Is there a way to get debug to dump which custom directory is being searched for templates and/or php and to see the results of what it finds. Just need a way to dig deeper on this. Any suggestions are welcome.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Custom Templates Ignored
July 25, 2011, 12:15:50 am
You can check what the value of the $config is in one of the forms (for example using smartyDebug). Config will have the custom template dir as one of its attributes?
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Templates Ignored
July 25, 2011, 01:22:48 pm
You've probably covered this but when my custom php files don't work it's usually because I left the CRM out of the path (ie. I have mycustomfolder/Contribute/Form/myfile.php rather than mycustomfolder/CRM/Contribute/Form/myfile.php)

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

jbertolacci

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
Re: Custom Templates Ignored
August 30, 2011, 03:13:31 pm
I'm still beating my head against this one. Thanks for the suggestions, Eileen and Erik.

I'm testing on the "Add Membership" form or "templates/CRM/Member/Form/Membership.tpl". I placed "{$config|@print_r}" in the core template and customTemplateDir is indeed pointed to my intended custom template directory...

[customTemplateDir] => /var/canada/sites/default/files/civicrm/custom/templates/


# ls /var/canada/sites/default/files/civicrm/custom/templates/CRM/Member/Form/
MembershipRenewal.tpl  Membership.tpl


But if I make changes to Membership.tpl and delete the contents of templates_c the changes do not appear on the form. Other thoughts?

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Custom Templates Ignored
August 30, 2011, 11:13:56 pm
No answer to your problem yet, but you can see what is available on your template by setting debug = yes in your CiviCRM settings (Administer/Global Setting/Debugging) and then adding '&smartyDebug=1' at the end of your URL? A pop up is then opened showing you all variables on the form. (One of them being the $config).
Kinda hard to see what your problem is, did you include the full tree of the templates in your custom dir?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

jbertolacci

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
Re: Custom Templates Ignored
September 08, 2011, 11:05:50 am
Whew -- problem solved. Looks like this was a bug with CiviEngage overwriting the custom template directory that was fixed in 3.3. I disabled CiviEngage and all is well.

For reference here are the bugtracker issues:

http://issues.civicrm.org/jira/browse/CRM-7054
http://issues.civicrm.org/jira/browse/CRM-7012

Big thanks to all on the forum and dlobo that offered assistance.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom Templates Ignored
September 08, 2011, 02:49:56 pm
Ah yes, it occurs to me that I might have remembered that one if I had thought about the fact you were on an old version
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Templates Ignored

This forum was archived on 2017-11-26.