Du bist nicht angemeldet. Der Zugriff auf einige Boards wurde daher deaktiviert.

#1 12. August 2015 21:00

parsec
kennt CMS/ms
Registriert: 04. Oktober 2012
Beiträge: 208

[GELÖST] Listit2 Fehler in Version 1.12 ?

Moin Moin,

ich wollte auf meinem frisch installiertem System mit dem Listit-Modul eine Liste erstellen, nach Aufruf im Backend, eine Fehlermeldung!

ERROR: at line 127 in file /usr/www/users/thomaskq/goldmilch2.de/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php

Scheinbar wurde das gelöst, aber wie? Wie immer ist mein Englisch nur dürftig, kann mir das jemand ausdeutschen oder muss ich mit einer älteren CMSms Version neuinstallieren?

http://www.cmsmadesimple.de/forum/viewtopic.php?id=4371

Gruß und Dank


"Es ist unmöglich, alles zu wissen" - Horaz

Offline

#2 12. August 2015 21:17

nockenfell
Moderator
Ort: Gontenschwil, Schweiz
Registriert: 09. November 2010
Beiträge: 2.934
Webseite

Re: [GELÖST] Listit2 Fehler in Version 1.12 ?

Das für dich relevante dürftest du hier finden:

http://forum.cmsmadesimple.org/viewtopi … 96#p320990

Ich habe den Fix nicht getestet, deshalb probieren. Öffne die ListIt2.module.php Datei (im Hauptverzeichnis des Moduls) und editiere diese. Tausche den im englischen Forum geposteten Teil aus. (1. Teil = alt, 2. Teil = neu)


[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog  /   Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox

Offline

#3 13. August 2015 22:10

Andynium
Moderator
Ort: Dohna / SN / Deutschland
Registriert: 13. September 2010
Beiträge: 7.018
Webseite

Re: [GELÖST] Listit2 Fehler in Version 1.12 ?

Entweder du nutzt CMSMS 1.11.13 ... oder du modifizierst das ListIt2 Modul.

1. Öffne die Datei ListIt2.module.php mit einem Editor deiner Wahl
2. Finde Zeile 325.
3. Ersetze die Funktion

  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;        
    }

durch diese Version der Funktion

  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;  
  }

Offline

#4 13. August 2015 17:26

parsec
kennt CMS/ms
Registriert: 04. Oktober 2012
Beiträge: 208

Re: [GELÖST] Listit2 Fehler in Version 1.12 ?

Ich danke euch beiden, es funktioniert!


"Es ist unmöglich, alles zu wissen" - Horaz

Offline