CMS MADE SIMPLE FORGE

Frontend Users

 

[#12268] Template override errors

avatar
Created By: Phil Scoltock (mantapro)
Date Submitted: Wed Mar 11 10:28:26 -0400 2020

Assigned To: Robert Campbell (calguy1000)
Version: 3.2
CMSMS Version: 2.2.10
Severity: Critical
Resolution: Works For Me
State: Open
Summary:
Template override errors
Detailed Description:
initially on first display FEU correctly presents custom template via
{FrontEndUsers action='changesettings' changesettingstemplate='my_template.tpl'}

But if you force a validation error in the submitted form (e.g. passwords don't
match) then when the error message is displayed FEU erroneously reverts to the 
orig_* template


History

Comments
avatar
Date: 2020-03-11 22:50
Posted By: Robert Campbell (calguy1000)

Just tested, worked fine.
      
avatar
Date: 2020-03-19 22:29
Posted By: Phil Scoltock (mantapro)

After further testing - it is still an error

With this in my page content 
{FrontEndUsers action='changesettings' changesettingstemplate='my_template.tpl'}

And even with this in the assets\FrontEndUsers\Templates\my_template.tpl file
<input type="hidden" name="{$actionid}changesettingstemplate"
value="my_template.tpl">

with config debug set to True

It is evident that \FrontEndUsers\action.ChangeSettings.php is run twice 

When the change settings page is display it correctly uses my_template.tpl

Now, with the addition of the hidden input tag - first time
action.ChangeSettings.php runs (ie. after the submit; prior to debug-redirect -
$params['changesettingsteplate'] (around line 159) now correctly contains the
value "my_template.tpl"

But when the debug-redirect is clicked action.ChangeSettings.php runs a second
time and now $params['changesettingsteplate'] (line 159) is now incorrectly not
set, so it reverts to the default i.e. orig_changesettings.tpl


      
Updates

Updated: 2020-03-11 22:50
resolution_id: => 11