Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load template 'file:CRM/Volunteer/Page/Angular.tpl' #616

Open
chrwei opened this issue Oct 20, 2024 · 1 comment
Open

Unable to load template 'file:CRM/Volunteer/Page/Angular.tpl' #616

chrwei opened this issue Oct 20, 2024 · 1 comment

Comments

@chrwei
Copy link

chrwei commented Oct 20, 2024

I'm using wordpress 6.6.1 on php8.2.22, civicrm 5.76.2, CiviVolunteer 2.4.5, and angular profiles 6.2.4. "Manage Volunteers" gives the following error

Unable to load template 'file:CRM/Volunteer/Page/Angular.tpl' in 'file:CRM/common/CMSPrint.tpl

most of the Volunteer menu options give the same error, but not all of them. I've migrated the database from a drupal 7 site that does not have this error. I've tried removing and installing the extension but it has the same error. could there be something in the old data causing it? everything else seems to work. I did the path updates and all as the migration doc said to.

CRM/common/CMSPrint.tpl exists at wp-content/plugins/civicrm/civicrm/templates/CRM/common/CMSPrint.tpl and CRM/Volunteer/Page/Angular.tpl exists at wp-content/uploads/civicrm/ext/org.civicrm.volunteer/templates/CRM/Volunteer/Page/Angular.tpl

I'm guessing something is off with the template include paths, how do I verify it's right? the paths all exist, owned by www-data and all read permissions.

debug:


#0 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render()
#1 /var/www/html/wp-content/uploads/civicrm/templates_c/en_US/bc/19/6e/bc196e41357dc2444b0537605167c8977d6b1254_0.file.CMSPrint.tpl.php(103): Smarty_Internal_Template->_subTemplateRender("CRM/Volunteer/Page/Angular.tpl", NULL, NULL, 0, 3600, (Array:0), 0, TRUE)
#2 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66d4b63f207f64_04542824(Object(Smarty_Internal_Template))
#3 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#4 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#5 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render()
#6 /var/www/html/wp-content/uploads/civicrm/templates_c/en_US/3f/51/03/3f5103ae173fa138b80a229d6310ac4f36230d43_0.file.wordpress.tpl.php(31): Smarty_Internal_Template->_subTemplateRender("file:CRM/common/CMSPrint.tpl", NULL, NULL, 0, 3600, (Array:0), 0, FALSE)
#7 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66d4b63f1f03e3_26711702(Object(Smarty_Internal_Template))
#8 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#9 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#10 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(FALSE, 0)
#11 /var/www/html/wp-content/plugins/civicrm/civicrm/packages/smarty4/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#12 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Page.php(273): Smarty_Internal_TemplateBase->fetch("CRM/common/wordpress.tpl")
#13 /var/www/html/wp-content/uploads/civicrm/ext/org.civicrm.volunteer/CRM/Volunteer/Page/Angular.php(10): CRM_Core_Page->run()
#14 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(333): CRM_Volunteer_Page_Angular->run((Array:3), NULL)
#15 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:17))
#16 /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#17 /var/www/html/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke((Array:2))
#18 /var/www/html/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke("")
#19 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters("", (Array:1))
#20 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
#21 /var/www/html/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#22 {main}

The drupal 7 site has the same CiviCRM and CiviVolunteer version but php8.1.28, if that's important for some reason.

@mlutfy
Copy link
Member

mlutfy commented Oct 24, 2024

Hi @chrwei, that seems like a smarty2 vs smarty4+ issue, because newer versions of CiviCRM default to using smarty5.

I think #617 should fix this. Or at least, with #617, I am not able to reproduce this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants