[Gelöst]Wenn ich eine neue Basic Page erstelle kommt Fehler: The website encountered an unexpected error. Please try again later
am 29.01.2020 - 16:14 Uhr in
Unerwartet kann ich keine neue Seite mehr erstellen. Sobald ich sie aufrufe kommt der Fehler: The website encountered an unexpected error. Please try again later. Bitte um Unterstützung.
Beste Grüße
Die Log-message zeigt folgendes an:
TypeError: Argument 1 passed to Drupal\cdn\File\FileUrlGenerator::generate() must be of the type string, null given, called in /var/www/vhosts/skho.de/httpdocs/modules/cdn/cdn.module on line 54 in Drupal\cdn\File\FileUrlGenerator->generate() (line 102 of /var/www/vhosts/skho.de/httpdocs/modules/cdn/src/File/FileUrlGenerator.php) #0 /var/www/vhosts/skho.de/httpdocs/modules/cdn/cdn.module(54): Drupal\cdn\File\FileUrlGenerator->generate(NULL) #1 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): cdn_file_url_alter(NULL, NULL, NULL) #2 /var/www/vhosts/skho.de/httpdocs/core/includes/file.inc(216): Drupal\Core\Extension\ModuleHandler->alter('file_url', NULL) #3 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Template/TwigExtension.php(147): file_create_url(NULL) #4 /var/www/vhosts/skho.de/httpdocs/sites/default/files/php/twig/5e31995fb9324_paragraph--page-header.ht_-kBkiEniT9cM0FmM96wH8SOMR/F_8Uiet3ZBHAsvPz9qBJ0BtRE8odR6T2xJLU2atNJ24.php(71): Drupal\Core\Template\TwigExtension->Drupal\Core\Template\{closure}(NULL) #5 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(455): __TwigTemplate_7846f681cefb0d13fa988d3402251e347193819cc203161b4b0325939b35122a->doDisplay(Array, Array) #6 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #7 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array) #8 /var/www/vhosts/skho.de/httpdocs/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #9 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/custom/s...', Array) #10 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('paragraph', Array) #11 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false) #12 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #13 /var/www/vhosts/skho.de/httpdocs/sites/default/files/php/twig/5e31995fb9324_field--entity-reference-r_JGbyoCNeUiy5k3ejNm6xHb-Oy/dsnyKN0JCHm7NNSwi4LvhF58v6kU_twhNbOc07v__ac.php(69): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #14 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(455): __TwigTemplate_24d4a778712a795f26720ba71a84264146110ed4376da777d92966a8aed6f7b4->doDisplay(Array, Array) #15 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #16 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array) #17 /var/www/vhosts/skho.de/httpdocs/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #18 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/custom/s...', Array) #19 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('field', Array) #20 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false) #21 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #22 /var/www/vhosts/skho.de/httpdocs/sites/default/files/php/twig/5e31995fb9324_page--node--page.html.twi_09a4Fz39xxMR27YL013Okm_cf/afaB-7dYgKZbMx6iApyxAy9cjr8naMDyix8SX5OjJ14.php(73): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #23 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(455): __TwigTemplate_96801a9a0f0e232d3fb4d1be885f03cdf6be74a2d05e2ece6ea57aadbc60de41->doDisplay(Array, Array) #24 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #25 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array) #26 /var/www/vhosts/skho.de/httpdocs/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #27 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/custom/s...', Array) #28 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('page', Array) #29 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false) #30 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array) #31 /var/www/vhosts/skho.de/httpdocs/sites/default/files/php/twig/5e31995fb9324_html.html.twig_4-K24hNgc4IXFugE1RNWq3_Nw/0yOJ2C5hiIlamUFxJn-KCcqrC5fjnLAA5xel8yAJiFg.php(103): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #32 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(455): __TwigTemplate_9f4582511e1b9bf9e9f2fcd3bef623bfceaec3f7cdb498bca674bcd0335ea1a9->doDisplay(Array, Array) #33 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) #34 /var/www/vhosts/skho.de/httpdocs/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array) #35 /var/www/vhosts/skho.de/httpdocs/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array) #36 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/custom/s...', Array) #37 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('html', Array) #38 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false) #39 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array) #40 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #41 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #42 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #43 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #44 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #45 /var/www/vhosts/skho.de/httpdocs/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #46 /var/www/vhosts/skho.de/httpdocs/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #47 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #48 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #49 /var/www/vhosts/skho.de/httpdocs/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #50 /var/www/vhosts/skho.de/httpdocs/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #51 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #52 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #53 /var/www/vhosts/skho.de/httpdocs/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #54 /var/www/vhosts/skho.de/httpdocs/core/lib/Drupal/Core/DrupalKernel.php(694): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #55 /var/www/vhosts/skho.de/httpdocs/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #56 {main}.
- Anmelden oder Registrieren um Kommentare zu schreiben
Wenn ich Zitat: TypeError:
am 29.01.2020 - 19:03 Uhr
Wenn ich
TypeError: Argument 1 passed to Drupal\cdn\File\FileUrlGenerator::generate() must be of the type string, null given,
bei Google eingebe komme ich zu diesem HInweis https://www.drupal.org/project/cdn/issues/3104597. Dort gibt es sogar schon einen Patch für das cdn-Modul, der den Fehler beheben soll.
.
Werner
drupal-training.de
Moderator und Drupal Trainer
* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Danke für die Info, mit
am 29.01.2020 - 21:05 Uhr
Danke für die Info,
mit Patches kann ich nicht wirklich umgehen. Soweit ich den Bericht verstanden habe, würde die Version 3.4 den Fehler beheben. Mein Modul ist auf diesen Stand, aber der Fehler besteht immer noch.
Terminal
am 29.01.2020 - 22:12 Uhr
patch -p0 ORIGINALDATEI < PATCHDATEI
beide Dateien sollten im selben Verzeichnis stehen.
https://wiki.ubuntuusers.de/patch/
https://books.google.com.co/books?id=zVqe3d19_D4C&pg=PA360&lpg=PA360&dq=...
https://www.emaz.de/Das-Zwischennetz/Tipps-Tricks/linux-patch
Drupal === lesen!
==============
WP? Auch cool!
https://intempore.com.co
Der Patch ist so simpel, der
am 29.01.2020 - 22:56 Uhr
Der Patch ist so simpel, der läßt sich zu Fuß einbauen.
In der Datei cdn.module die Zeile
function cdn_file_url_alter(&$uri) {
suchen.Direkt danach folgende 5 Zeilen einfügen:
// Safe check for empty uri's.
if (empty($uri)) {
return;
}
Die Datei speichern und fertig. Zeile 5 ist eine Leerzeile, im Patch die, die nur ein + enthält. Die +-Zeichen zeigen, daß etwas eingefügt wird.
.
Werner
drupal-training.de
Moderator und Drupal Trainer
* - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Vielen herzlichen Dank. Es
am 29.01.2020 - 23:34 Uhr
@wla - Vielen herzlichen Dank. Es hat einwandfrei geklappt.
Beste Grüße
@jorgemontoyabVielen Dank für
am 29.01.2020 - 23:35 Uhr
@jorgemontoyabVielen
Dank für die Links