Page 1 of 2

ListIt2 and CMSMS 1.12

Posted: Mon Apr 13, 2015 4:44 pm
by jissey
Hi,
ListIt2 does not work with the new version 1.12 of CMSMS.
Unfortunaly, noboby can modify the module in the forge.

To fix it, you must modifiy EasyList.module.php ListIt2.module.php file by adding

Code: Select all

		$smarty->no_absolute_templates = FALSE;
at line 340.

Re: ListIt2 and CMSMS 1.12

Posted: Mon Apr 13, 2015 4:59 pm
by Jo Morg
jissey wrote:To fix it, you must modifiy EasyList.module.php file by adding
Code:
$smarty->no_absolute_templates = FALSE;
at line 340.
In my opinion this is not a fix, it's a bad workaround at best, as it re-opens the security hole closed in a recent core fix. I would understand a workaround like this for LI2... but not for a module under active development...
The proper way to fix this would be by using a smarty resource (took me less than 20 minutes to setup and test a module just to try this).

Re: ListIt2 and CMSMS 1.12

Posted: Mon Apr 13, 2015 5:16 pm
by jissey
You're right Jo, it is not a fix but a not so bad workaround, because the variable exists and I just use it.
Anyway, the hole is not completely closed.

If you have time to test with a smarty ressource, it will help me to fix EasyList :D

Re: ListIt2 and CMSMS 1.12

Posted: Mon Apr 13, 2015 5:20 pm
by jack4ya
Other work around? I need this.
Or ill just migrate back to 1.11.3

Re: ListIt2 and CMSMS 1.12

Posted: Mon Apr 13, 2015 6:30 pm
by Jo Morg
jissey wrote:You're right Jo, it is not a fix but a not so bad workaround, because the variable exists and I just use it.
I would recommend a different workaround for LI2 (it's not a fix and shouldn't be used in other modules)
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;  
  }
Keep in mind: this is not an official fix. Just a workaround for LI2.

Re: ListIt2 and CMSMS 1.12

Posted: Wed Apr 29, 2015 2:34 pm
by Recon
ListIt is one of the best modules. This is very sad, that I can not upgrade or use newes cmsms because of this. We noobs do not know what modules can be used with which cmsms installation.

R

Re: ListIt2 and CMSMS 1.12

Posted: Wed Apr 29, 2015 3:41 pm
by jissey
Hi,
for the coming soon CMSMS V2, you'll be able to use Easylist instead of ListIt :)
https://github.com/CmsMadeSimpleTierMod ... master.zip

Re: ListIt2 and CMSMS 1.12

Posted: Wed Apr 29, 2015 9:26 pm
by Rolf
Recon wrote:We noobs do not know what modules can be used with which cmsms installation.
http://dev.cmsmadesimple.org/project/li ... ed/CMSMS-2

Re: ListIt2 and CMSMS 1.12

Posted: Tue May 12, 2015 6:47 pm
by KayakMan
@Jo Morg

Thank you SO much for that JO!

Doing an install build here that is very reliant on Listit2..... just had a minor heart attack... you saved the day with that post.

Re: ListIt2 and CMSMS 1.12

Posted: Wed May 13, 2015 9:14 pm
by faglork
Jo Morg wrote:I would recommend a different workaround for LI2 (it's not a fix and shouldn't be used in other modules)
-----------snip-------------------
Keep in mind: this is not an official fix. Just a workaround for LI2.
You just made my day.

Thank you very much!

Cheers,
Alex

Re: ListIt2 and CMSMS 1.12

Posted: Wed May 27, 2015 11:02 am
by timdebuurman
I want to start a new project, in which I wanted to use ListIt (to manage a portfolio)

Can I use Easylist with 1.12?

Otherwise, will it be easy to go gfrom ListIt to Easylist once CMSMS2 is ready to go?

Re: ListIt2 and CMSMS 1.12

Posted: Wed May 27, 2015 12:42 pm
by jissey
Hi
No you can t use easylist with cmsms 1.1X series.
There is no convertion planned from listit to easylist but you will be able to use import feature in easylist.

Re: ListIt2 and CMSMS 1.12

Posted: Fri Jun 05, 2015 11:49 am
by HarmO
I tried this fix, but it ain't working.

so, i installed the latest CMSMS (1.12)
Installed the latest Listit2 (1.4.1)

then i modified line 325 of ListIt2.module.php

Next i added some ListIt2 instances but when i want to open them (to settup or to add content) i get an error

Code: Select all

Error: at line 127 in file /home/mbcrisdil/domains/risdilbeek.be/public_html/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php:Unable to load template file '/home/mbcrisdil/domains/risdilbeek.be/public_html/modules/ListIt2/framework/templates/itemtab.tpl'
php 5.4.18
(E_STRICT is enabled in the error_reporting)

Re: ListIt2 and CMSMS 1.12

Posted: Mon Jun 08, 2015 12:35 pm
by reinhardmohr
Hi,
thanks everybody for your help and for the workaround for ListIt2 under CMSms 1.12. I tried it and it worked very well!
But maybe someone could provide some help again?
I had updated a website to 1.12. I was relying on ListIt2 there – so the workaround saved me. But then I installed ListIt2FEEdit. Only to notice that it doesn't work, either.
Whenever I call a page with the ListIt2FEEdit tag in it I get a smarty console error saying:

Code: Select all

ERROR: at line 127 in file /mnt/webq/b2/18/5286218/htdocs/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php:

Message:

Unable to load template file '/mnt/webq/b2/18/5286218/htdocs/modules/ListIt2FEEdit/templates/dflt_template.tpl'
I am not a programmer – so I tried three or four times to transfer this line from the above mentioned workaround

Code: Select all

------ removed by moderator -------
somewhere over to one of ListIt2FEEdit files. Of course with no success …

Is there any chance to find a workaround for ListIt2FEEdit like for ListIt2 itself? So I could at least upgrade CMSms and all the modules to the latest version and wait until 2.0 is stable.

Thanks a lot for any information. And thanks a lot for helping!

Reinhard

Re: ListIt2 and CMSMS 1.12

Posted: Mon Jun 08, 2015 12:43 pm
by Jo Morg
ListIt2FEEdit seems to be still actively developed so no hacks for it are allowed (keep in mind that LI2 is an exception since the developers are no longer maintaining the code and CMSMS 1.12 made a security fix that made LI2 malfunction).
I advise to file a bug report: http://dev.cmsmadesimple.org/projects/listit2feedit
Thanks.