Page 1 of 1
[ADVANCED] FEU protect page fix needed
Posted: Mon Apr 13, 2015 4:43 pm
by jack4ya
I have a multilingual website with MLE and multiple groups which need their one pwd protected pages.
Last update 1.11.3 has removed the page protected content type with a single 403 page approach. While this would work with a single language website and/or one FEU group... It's not something I can use out of the box.
Any ideas on how to approach? Id rather not do a htaccess solution as this becomes quite cumbersome. The amount of languages (and pages) will grow considerably over time as well.
(having all latest modules, and php versions)
Any suggestions?
Just notest 1.12... let's try.
Re: [ADVANCED] FEU protect page fix needed
Posted: Mon Apr 13, 2015 5:22 pm
by jack4ya
1.12 brings Listit2 problems.
Going to revert.
So original questions stand.
Re: [ADVANCED] FEU protect page fix needed
Posted: Mon Apr 27, 2015 9:56 pm
by Dr.CSS
If you are using FEU the Content Type: Protected Page is still available even with 1.12, I just looked at a site with it...
Re: [ADVANCED] FEU protect page fix needed
Posted: Mon Jun 01, 2015 3:09 pm
by HarmO
Have the same problem altough i'm still using CMSMS 1.11.13 because LISTIT2 doesn't run correctly in CMSMS 1.12.
my server is running php 5.4.33
and where a website with FEU 1.17.1 is running fine on an other site on the same server, the FEU 1.28 gives me a 403 error in stead of login page.
so now what?
Re: [ADVANCED] FEU protect page fix needed
Posted: Mon Jun 01, 2015 3:47 pm
by staartmees
JoMorg wrote a workaround for LI2 in CMS MS 1.12
in ListIt2.module.php find line 325. Replace:
Code: Select all
public function ModProcessTemplate($tpl_name)
{
$ok = (strpos($tpl_name, '..') === false);
if (!$ok) return;
$smarty = cmsms()->GetSmarty();
$config = cmsms()->GetConfig();
$result = '';
$oldcache = $smarty->caching;
$smarty->caching = $this->can_cache_output() ? Smarty::CACHING_LIFETIME_CURRENT : Smarty::CACHING_OFF;
$files = array();
$files[] = cms_join_path($config['root_path'],'module_custom',$this->GetName(),'templates',$tpl_name);
$files[] = cms_join_path($this->GetModulePath(),'templates',$tpl_name);
$files[] = cms_join_path(LISTIT2_TEMPLATE_PATH,$tpl_name);
foreach($files as $file) {
if(is_readable($file)) {
$result = $smarty->fetch($file);
break;
}
}
$smarty->caching = $oldcache;
return $result;
}
with
Code: Select all
public function ModProcessTemplate($tpl_name)
{
$ok = (strpos($tpl_name, '..') === false);
if (!$ok) return;
$smarty = cmsms()->GetSmarty();
$config = cmsms()->GetConfig();
cmsms()->GetSmarty()->no_absolute_templates = FALSE;
$result = '';
$oldcache = $smarty->caching;
$smarty->caching = $this->can_cache_output() ? Smarty::CACHING_LIFETIME_CURRENT : Smarty::CACHING_OFF;
$files = array();
$files[] = cms_join_path($config['root_path'],'module_custom',$this->GetName(),'templates',$tpl_name);
$files[] = cms_join_path($this->GetModulePath(),'templates',$tpl_name);
$files[] = cms_join_path(LISTIT2_TEMPLATE_PATH,$tpl_name);
foreach($files as $file) {
if(is_readable($file)) {
$result = $smarty->fetch($file);
break;
}
}
$smarty->caching = $oldcache;
cmsms()->GetSmarty()->no_absolute_templates = TRUE;
return $result;
}
Re: [ADVANCED] FEU protect page fix needed
Posted: Tue Jun 02, 2015 11:34 am
by HarmO
thx staartmees, i'll try that.
Ok found it the solution to the FEU error,
You need to make a 403 error page with te loginform included.
than it works.