CMS MADE SIMPLE FORGE

CGExtensions

 

[#11415] "Invalid resource name passed to CGExtensions::CGGetTemplateResource" - CGHeadMaster / CGExtensions

avatar
Created By: Franck (knarf)
Date Submitted: Mon Jun 19 07:40:06 -0400 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.55.5
CMSMS Version: 2.2.1
Severity: Major
Resolution: Fixed
State: Open
Summary:
"Invalid resource name passed to CGExtensions::CGGetTemplateResource" - CGHeadMaster / CGExtensions
Detailed Description:
Not sure wether it's a CGExtensions or CGHeadMaster bug, so I post it here.

When upgrading from CGExtensions 1.55.4 to 1.55.5, on a site using CGHM (latest
version) tags, here is the error on all pages:

Invalid resource name passed to CGExtensions::CGGetTemplateResource

Trace:

#0 /htdocs/modules/CGExtensions/CGExtensions.module.php(1981):
CGExtensions->CGGetTemplateResource('string:{$config...', NULL)
#1 /htdocs/modules/CGHeadMaster/CGHeadMaster.module.php(309):
CGExtensions->CreateSmartyTemplate('string:{$config...')
#2 /htdocs/modules/CGHeadMaster/CGHeadMaster.module.php(374):
CGHeadMaster->get_field_attr('canonical', 'href')
#3 /htdocs/modules/CGHeadMaster/lib/class.smarty_plugins.php(97):
CGHeadMaster->render_field('canonical')
#4
/htdocs/tmp/templates_c/931e1e9eac676a7613090088c9d8b4df6c1f1c50_0.tpl_head.24.php(33):
CGHeadMaster\smarty_plugins::cghm_render(Array,
Object(Smarty_Internal_Template))
#5 /htdocs/lib/smarty/sysplugins/smarty_template_resource_base.php(128):
content_5947b36a3d8ec2_34045664(Object(Smarty_Internal_Template))
#6 /htdocs/lib/smarty/sysplugins/smarty_template_compiled.php(172):
Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#7 /htdocs/lib/smarty/sysplugins/smarty_internal_template.php(206):
Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#8 /htdocs/lib/smarty/sysplugins/smarty_internal_templatebase.php(216):
Smarty_Internal_Template->render(false, 0)
#9 /htdocs/lib/smarty/sysplugins/smarty_internal_templatebase.php(107):
Smarty_Internal_TemplateBase->_execute(NULL, NULL, NULL, NULL, 0)
#10 /htdocs/index.php(161): Smarty_Internal_TemplateBase->fetch()
#11 {main}


History

Comments
avatar
Date: 2017-06-19 10:45
Posted By: Robert Campbell (calguy1000)

I Fixed this in CGHeadMaster.   
      
avatar
Date: 2017-06-19 10:46
Posted By: Franck (knarf)

Thanks !
      
avatar
Date: 2017-06-19 10:49
Posted By: TannSan (TannSan)

I'm getting the same with the FEU module.  The login box itself displays but
anywhere else with the {FrontEndUsers} tag is used such as {FrontEndUsers
action="logoutform"} instead gives a red box with:

"Invalid resource name passed to CGExtensions::CGGetTemplateResource"
      
avatar
Date: 2017-06-19 13:40
Posted By: TannSan (TannSan)

A further example is when I logout from FEU it should redirect to a page with
the alias "jobbs".  Instead I get the Oops page:

Error: at line 2015 in file
/var/www/vhosts/niotre.com/ikontimer.niotre.com/modules/CGExtensions/CGExtensions.module.php:
Message: Invalid resource name passed to CGExtensions::CGGetTemplateResource

Trace
#0
/var/www/vhosts/niotre.com/ikontimer.niotre.com/modules/CGExtensions/CGExtensions.module.php(1981):
CGExtensions->CGGetTemplateResource('string:jobbs', NULL)
#1
/var/www/vhosts/niotre.com/ikontimer.niotre.com/modules/FrontEndUsers/action.logout.php(61):
CGExtensions->CreateSmartyTemplate('string:jobbs')
#2
/var/www/vhosts/niotre.com/ikontimer.niotre.com/lib/classes/class.CMSModule.php(1415):
include('/var/www/vhosts...')
#3
/var/www/vhosts/niotre.com/ikontimer.niotre.com/modules/CGExtensions/CGExtensions.module.php(621):
CMSModule->DoAction('logout', 'cntnt01', Array, '33')
#4
/var/www/vhosts/niotre.com/ikontimer.niotre.com/modules/FrontEndUsers/FrontEndUsers.module.php(626):
CGExtensions->DoAction('logout', 'cntnt01', Array, '33')
#5
/var/www/vhosts/niotre.com/ikontimer.niotre.com/lib/classes/class.CMSModule.php(1489):
FrontEndUsers->DoAction('logout', 'cntnt01', Array, '33')
#6 /var/www/vhosts/niotre.com/ikontimer.niotre.com/lib/page.functions.php(543):
CMSModule->DoActionBase('logout', 'cntnt01', Array, '33', Object(Smarty_CMS))
#7 /var/www/vhosts/niotre.com/ikontimer.niotre.com/index.php(134):
preprocess_mact('33')
#8 {main}

I use the Protected Page feature to display the login screen.  Page Content
Type: Error Page and on Options tab it's set to "Page Forbidden (403)".  If I
make a mistake with the login it redirects to the /error403 page which displays
the login box.  When I then login with the correct details it should redirect me
to the /jobbs page but instead it took me to the Oops page with:

Error: at line 81 in file
/var/www/vhosts/niotre.com/ikontimer.niotre.com/lib/smarty/sysplugins/smarty_resource_custom.php:
Unable to read template module_db_tpl 'CGExtensions;cg_errormsg'

I tracked this down to the Error Template field in the admin CGE section.  It's
blank for me which may have been something I set with the previous version.  To
get rid of the error I "Reset to factory defaults".  That still doesn't do the
redirection to /jobbs though and instead displays the same red box I mentioned
earlier with this message:

Invalid resource name passed to CGExtensions::CGGetTemplateResource

Sorry I'm not doing more to help then report issues, today was a big launch
which I screwed up by trying to apply the 2.2.1 Critical Security Release.  The
warning made me nervous so I made the rash decision to try and patch today of
all days!  In the end reverted back to 2.1.6 which is the version I was supposed
to release with.
      
Updates

Updated: 2017-06-19 10:45
resolution_id: 5 => 7

Updated: 2017-06-19 07:51
description: Not sure wether it's a CGExtensions or CGHeadMaster bug, so I post it here. When upgrading form CGExtensions 1.55.4 to 1.55.5, on a site using CGHM (latest version) tags, here is the error on all pages: Invalid resource name passed to CGExtensions: => Not sure wether it's a CGExtensions or CGHeadMaster bug, so I post it here. When upgrading from CGExtensions 1.55.4 to 1.55.5, on a site using CGHM (latest version) tags, here is the error on all pages: Invalid resource name passed to CGExtensions:
resolution_id: => 5