Contao-Camp 2024
Ergebnis 1 bis 8 von 8

Thema: Fehler beim Anlegen eines News-Readers

  1. #1
    Contao-Nutzer
    Registriert seit
    07.12.2019.
    Beiträge
    147

    Standard Fehler beim Anlegen eines News-Readers

    Hallo Community,

    ich habe ein Contao von 4.4 auf 4.9 gezogen und nun erhalte ich beim Anlegen eines Nachrichtenlesers den folgenden Fehler:
    Code:
    [2021-03-05 09:17:21] request.CRITICAL: Uncaught PHP Exception RuntimeException: "System::importStatic() failed because class "tl_module_comments" is not a valid class name or does not exist." at spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php line 271 {"exception":"[object] (RuntimeException(code: 0): System::importStatic() failed because class \"tl_module_comments\" is not a valid class name or does not exist. at spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:271)"} []
    Was ich schon versucht habe:
    - Vendor komplett entfernen und neu installieren
    - Composer Update erneut durchführen

    Hat jemand eine Idee, woran es liegen könnte? Bzw. wie ich es lösen kann.
    Alle anderen Nachrichten-Funktionen funktionieren.

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.050
    Partner-ID
    10107

    Standard

    Dürfte an einer Extension liegen. Nutze den Debug-Modus und poste den Stack Trace.
    » sponsor me via GitHub or PayPal or Revolut

  3. #3
    Contao-Nutzer
    Registriert seit
    07.12.2019.
    Beiträge
    147

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Dürfte an einer Extension liegen. Nutze den Debug-Modus und poste den Stack Trace.
    Code:
    {?
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:271 {?
        Contao\System::importStatic($strClass, $strKey = null, $blnForce = false) …
        › {
        › \tthrow new \RuntimeException('System::importStatic() failed because class "' . $strClass . '" is not a valid class name or does not exist.');
        › }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Widget.php:1285 {?
        Contao\Widget::getAttributesFromDca($arrData, $strName, $varValue = null, $strField = '', $strTable = '', $objDca = null) …
        › \t$arrCallback = $arrData['options_callback'];
        › \t$arrData['options'] = static::importStatic($arrCallback[0])->{$arrCallback[1]}($objDca);
        › }
        arguments: {?
          $strClass: "tl_module_comments"
        }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:320 {?
        Contao\DataContainer->row($strPalette = null) …
        › /** @var Widget $objWidget */
        › $objWidget = new $strClass($strClass::getAttributesFromDca($arrData, $this->strInputName, $this->varValue, $this->strField, $this->strTable, $this));
        › 
        arguments: {?
          $arrData: [ …7]
          $strName: "com_template"
          $varValue: "com_default"
          $strField: "com_template"
          $strTable: "tl_module"
          $objDca: Contao\DC_Table {#673 …}
        }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:1999 {?
        Contao\DC_Table->edit($intId = null, $ajaxId = null) …
        › \t// Build the row and pass the current palette string (thanks to Tristan Lins)
        › \t$blnAjax ? $arrAjax[$thisId] .= $this->row($this->strPalette) : $return .= $this->row($this->strPalette);
        › }
        arguments: {?
          $strPalette: "{title_legend},name,headline,type;{config_legend},news_archives;{template_legend:hide},news_metaFields,news_template,customTpl;{image_legend:hide},imgSize;{comment_legend:hide},com_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssStyleSelector,cssID"
        }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:644 {?
        Contao\Backend->getBackendModule($module, PickerInterface $picker = null) …
        › 
        › \treturn $dc->$act();
        › }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167 {?
        Contao\BackendMain->run() …
        › 
        › $this->Template->main .= $this->getBackendModule(Input::get('do'), $picker);
        › $this->Template->title = $this->Template->headline;
        arguments: {?
          $module: "themes"
          $picker: null
        }
      }
      /spielwiese.local/contao_x/vendor/contao/core-bundle/src/Controller/BackendController.php:48 {?
        Contao\CoreBundle\Controller\BackendController->mainAction(): Response …
        › 
        ›     return $controller->run();
        › }
      }
      /spielwiese.local/contao_x/vendor/symfony/http-kernel/HttpKernel.php:158 {?
        Symfony\Component\HttpKernel\HttpKernel->handleRaw(Request $request, int $type = self::MASTER_REQUEST): Response …
        › // call controller
        › $response = $controller(...$arguments);
        › 
      }
      /spielwiese.local/contao_x/vendor/symfony/http-kernel/HttpKernel.php:80 {?
        Symfony\Component\HttpKernel\HttpKernel->handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) …
        › try {
        ›     return $this->handleRaw($request, $type);
        › } catch (\Exception $e) {
        arguments: {?
          $request: Symfony\Component\HttpFoundation\Request {#2 …}
          $type: 1
        }
      }
      /spielwiese.local/contao_x/vendor/symfony/http-kernel/Kernel.php:201 {?
        Symfony\Component\HttpKernel\Kernel->handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) …
        › try {
        ›     return $this->getHttpKernel()->handle($request, $type, $catch);
        › } finally {
        arguments: {?
          $request: Symfony\Component\HttpFoundation\Request {#2 …}
          $type: 1
          $catch: true
        }
      }
      /spielwiese.local/contao_x/web/index.php:31 {?
        require …
        › 
        › $response = $kernel->handle($request);
        › $response->send();
        arguments: {?}
      }
      /spielwiese.local/contao_x/web/app.php:4 {?
        › // Backwards compatibility
        › require __DIR__.'/index.php';
        › 
        arguments: {?
          "/spielwiese.local/contao_x/web/index.php"
        }
      }
    }

    ---



    Code:
    RuntimeException:
    System::importStatic() failed because class "tl_module_comments" is not a valid class name or does not exist.
    
      at vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:271
      at Contao\System::importStatic('tl_module_comments')
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Widget.php:1285)
      at Contao\Widget::getAttributesFromDca(array('label' => array('Kommentartemplate', 'Hier können Sie das Kommentartemplate auswählen.'), 'default' => 'com_default', 'exclude' => false, 'inputType' => 'select', 'options_callback' => array('tl_module_comments', 'getCommentTemplates'), 'eval' => array('tl_class' => 'w50', 'required' => false), 'sql' => 'varchar(32) NOT NULL default \'\''), 'com_template', 'com_default', 'com_template', 'tl_module', object(DC_Table))
         (vendor/contao/core-bundle/src/Resources/contao/classes/DataContainer.php:320)
      at Contao\DataContainer->row('{title_legend},name,headline,type;{config_legend},news_archives;{template_legend:hide},news_metaFields,news_template,customTpl;{image_legend:hide},imgSize;{comment_legend:hide},com_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssStyleSelector,cssID')
         (vendor/contao/core-bundle/src/Resources/contao/drivers/DC_Table.php:1999)
      at Contao\DC_Table->edit()
         (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:644)
      at Contao\Backend->getBackendModule('themes', null)
         (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167)
      at Contao\BackendMain->run()
         (vendor/contao/core-bundle/src/Controller/BackendController.php:48)
      at Contao\CoreBundle\Controller\BackendController->mainAction()
         (vendor/symfony/http-kernel/HttpKernel.php:158)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/http-kernel/HttpKernel.php:80)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/http-kernel/Kernel.php:201)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (web/index.php:31)
      at require('/spielwiese.local/contao_x/web/index.php')
         (web/app.php:4)
    Geändert von Fonjensi (05.03.2021 um 08:51 Uhr)

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.050
    Partner-ID
    10107

    Standard

    Durchsuche deine Installation mal nach "tl_module_comments".
    » sponsor me via GitHub or PayPal or Revolut

  5. #5
    Contao-Nutzer
    Registriert seit
    07.12.2019.
    Beiträge
    147

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Durchsuche deine Installation mal nach "tl_module_comments".
    Habe ich über einen grep -R gemacht, aber finde hier leider nur die Fehler im Systemlog.

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.050
    Partner-ID
    10107

    Standard

    Muss aber irgendwo vorkommen . Mindestens zwei mal: einmal unter var/cache/prod/contao/ und einmal unter system/modules/ oder vendor/. Eine Extension benutzt wohl noch die alte tl_module_comments Class, die in neueren Contao Versionen entfernt wurde.
    » sponsor me via GitHub or PayPal or Revolut

  7. #7
    Contao-Nutzer
    Registriert seit
    07.12.2019.
    Beiträge
    147

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Muss aber irgendwo vorkommen . Mindestens zwei mal: einmal unter var/cache/prod/contao/ und einmal unter system/modules/ oder vendor/. Eine Extension benutzt wohl noch die alte tl_module_comments Class, die in neueren Contao Versionen entfernt wurde.
    Das stimmt, ja.
    Habe mal in den system/modules/ - Ordner gesehen und dort war tatsächlich noch eine alte Erweiterung, die das verwendet hat.
    Dort wurde das aber über zwei Variablen zusammengebaut mit $var1 = tl_modules_ $var2 = comments.

    Deshalb wurde es wohl nicht erfasst.
    Was das genau sein sollte, weiß ich nicht

    Danke für die Hilfe.

  8. #8
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.050
    Partner-ID
    10107

    Standard

    Ah ok, ja das ist natürlich doof.
    » sponsor me via GitHub or PayPal or Revolut

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •