ListIt2 and CMSMS 1.12

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
jissey
Forum Members
Forum Members
Posts: 61
Joined: Sun Jul 18, 2010 12:17 pm
Location: South of France

ListIt2 and CMSMS 1.12

Post 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.
Last edited by jissey on Mon Apr 13, 2015 5:22 pm, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: ListIt2 and CMSMS 1.12

Post 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).
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
jissey
Forum Members
Forum Members
Posts: 61
Joined: Sun Jul 18, 2010 12:17 pm
Location: South of France

Re: ListIt2 and CMSMS 1.12

Post 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
jack4ya
Power Poster
Power Poster
Posts: 294
Joined: Thu Oct 19, 2006 10:07 am

Re: ListIt2 and CMSMS 1.12

Post by jack4ya »

Other work around? I need this.
Or ill just migrate back to 1.11.3
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: ListIt2 and CMSMS 1.12

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am
Location: Finland

Re: ListIt2 and CMSMS 1.12

Post 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
User avatar
jissey
Forum Members
Forum Members
Posts: 61
Joined: Sun Jul 18, 2010 12:17 pm
Location: South of France

Re: ListIt2 and CMSMS 1.12

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: ListIt2 and CMSMS 1.12

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
KayakMan
Forum Members
Forum Members
Posts: 19
Joined: Thu Mar 12, 2015 1:49 pm

Re: ListIt2 and CMSMS 1.12

Post 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.
faglork

Re: ListIt2 and CMSMS 1.12

Post 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
User avatar
timdebuurman
Power Poster
Power Poster
Posts: 891
Joined: Sun Nov 06, 2011 8:15 pm
Location: Deventer, Netherlands

Re: ListIt2 and CMSMS 1.12

Post 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?
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
User avatar
jissey
Forum Members
Forum Members
Posts: 61
Joined: Sun Jul 18, 2010 12:17 pm
Location: South of France

Re: ListIt2 and CMSMS 1.12

Post 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.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: ListIt2 and CMSMS 1.12

Post 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)
Kind regards,
HarmO
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm
Location: Munich, Germany

Re: ListIt2 and CMSMS 1.12

Post 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
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: ListIt2 and CMSMS 1.12

Post 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.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Locked

Return to “Modules/Add-Ons”