简体   繁体   English

Drupal 错误 502 网关错误。 当我访问内容中的 TabPages 时

[英]Drupal Error 502 bad gateway. When I Access TabPages inside of Content

I'm having this issue with Drupal after an update from Drupal 7 to Drupal 8.从 Drupal 7 更新到 Drupal 8 后,我遇到了 Drupal 的这个问题。

The error is the following, when I go to the admin page, I go to content -> filter by -> tab pages -> and try to access a tab page a 502 bad gateway error presents.错误如下,当我 go 到管理页面时,我 go 到内容 -> 过滤 -> 标签页 -> 并尝试访问标签页,出现 502 错误网关错误。

My question is, someone has encounter with this particular error?我的问题是,有人遇到过这个特殊错误吗? You have any idea how can to solve it?你知道如何解决吗?

I never use Drupal, this project came to me through my company我从没用过 Drupal,这个项目是通过我公司找到的

Thank you!谢谢!

Error: Call to a member function setDisplay() on null in Drupal\twig_views\Twig\RenderView::renderViewWithTitle() (line 59 of /var/www/drupal/modules/contrib/twig_views/src/Twig/RenderView.php)
#0 /var/www/drupal/sites/default/files/php/twig/61feb32897263_page--node--tab-pages.htm_hLYAbaj1Mcn9LHSkwCDf8ZbIY/xcq3DAem6ZT2uZs-Kb3Gn7rZluiRQRmG__g4ETTayds.php(130): Drupal\twig_views\Twig\RenderView::renderViewWithTitle()
#1 /var/www/drupal/vendor/twig/twig/src/Template.php(455): __TwigTemplate_827f20d5d2f1c354e33f539028960e11adcc66cb1f8d12dddbb1dcb48a017905->doDisplay()
#2 /var/www/drupal/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling()
#3 /var/www/drupal/vendor/twig/twig/src/Template.php(434): Twig\Template->display()
#4 /var/www/drupal/core/themes/engines/twig/twig.engine(64): Twig\Template->render()
#5 /var/www/drupal/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template()
#6 /var/www/drupal/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render()
#7 /var/www/drupal/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender()
#8 /var/www/drupal/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render()
#9 /var/www/drupal/sites/default/files/php/twig/61feb32897263_html.html.twig_kaa8ME2Dkk82q-sPQZLCsSAsP/9-CkZxCTZaBASgY3GcbELndOM5DYZkgNaMvxIM5XsDc.php(118): Drupal\Core\Template\TwigExtension->escapeFilter()
#10 /var/www/drupal/vendor/twig/twig/src/Template.php(455): __TwigTemplate_f599ebce244696485f15c3f1883c62b8ba60d77b9f9eb7c31be207d98bac4f5c->doDisplay()
#11 /var/www/drupal/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling()
#12 /var/www/drupal/vendor/twig/twig/src/Template.php(434): Twig\Template->display()
#13 /var/www/drupal/core/themes/engines/twig/twig.engine(64): Twig\Template->render()
#14 /var/www/drupal/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template()
#15 /var/www/drupal/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render()
#16 /var/www/drupal/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender()
#17 /var/www/drupal/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render()
#18 /var/www/drupal/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#19 /var/www/drupal/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext()
#20 /var/www/drupal/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#21 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#22 /var/www/drupal/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#23 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#24 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#25 /var/www/drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#26 /var/www/drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#27 /var/www/drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#28 /var/www/drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#29 /var/www/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#30 /var/www/drupal/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle()
#31 /var/www/drupal/index.php(19): Drupal\Core\DrupalKernel->handle()
#32 {main}

Is "Tab Pages" a Content Type in your filter? “标签页”是您过滤器中的内容类型吗?

Have you tried running the Update Database job and clearing Drupal's cache?您是否尝试过运行更新数据库作业并清除 Drupal 的缓存?

If that doesn't sort it out.如果那不能解决问题。 I would then try installing the Twig Tweak Module .然后我会尝试安装Twig Tweak Module Then locate the server folder of the theme in use at: /web/themes/custom/...然后在以下位置找到正在使用的主题的服务器文件夹:/web/themes/custom/...

Inside there, it seems you might have a custom template utilizing the Twig function:在里面,您似乎有一个使用 Twig function 的自定义模板:

{{ render_view('view_machine_name', 'display_machine_name', $arg1, $arg2, ...) }}

If you locate that, then try updating that function with the one provided by Twig Tweak.如果找到它,请尝试使用 Twig Tweak 提供的更新 function。

{{ drupal_view('view_machine_name', 'display_machine_name') }}

Then clear Drupal's cache.然后清除 Drupal 的缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM