(这里的新手,我希望这是一个简单的问题!) 在运行WP多年之后,我决定尝试一些“参与”的工作,并切换到OctoberCMS,然后使用W3Schools PHP。
但是,在最近的RainLab Blog更新之后,我的网站仅重新路由到异常错误。这就是玩网站管理员的收获。
错误消息如下:
The component 'RainLab\Blog\Components\Post' does not contain a method 'getRouter'
catch (BadMethodCallException $ex) {}
if (method_exists($this->controller, $method)) {
return call_user_func_array([$this->controller, $method], $parameters);
}
throw new BadMethodCallException(Lang::get('cms::lang.component.method_not_found', [
'name' => get_class($this),
'method' => $method
]));
}
/**
我可以访问有问题的文件(已下载文件进行分析),但无法弄清楚如何解决错误,甚至无法弄清楚getRouter是什么!
Google让我失败了,我只需要一点指导!
我已经查看了GitHub上的文档以及其他地方的类似错误消息,但是目前我还没有足够的知识来推断我的解决方案。
除某些CSS更改和我修改的样式表外,安装均为默认设置。 AFAIK,但是CSS应该不干扰PHP后端。
就解决方案而言:如果有办法防止这种处理;任何允许网站正常显示的方法(而不是抛出此愚蠢的错误消息)!
编辑:这是一个后端日志(很抱歉,长度-我不确定究竟是什么重要。
编辑2:据我所知,除了安装了几个不同的插件(博客,注释,嵌入和其他几个插件)外,没有什么是“自定义”的。 (我认为最小的安装将有助于避免这种情况!但是,尽管遇到了挫折,我还是喜欢从整体上学习。)
Dashboard CMS Media Pages Blog Comments Users Settings
Misc
Comments Manage Settings.
CMS
Front-end theme Manage the front-end theme and customization options.
Maintenance mode Configure the maintenance mode page and toggle the setting.
System
Updates & Plugins Update the system, manage and install plugins and themes.
Administrators Manage back-end administrator users, groups and permissions.
Editor settings Customize the global editor preferences, such as font size and color scheme.
Customize back-end Customize the administration area such as name, colors and logo.
Users
User settings Manage user based settings.
Blog
Blog Manage blog settings
Mail
Logs
Event log View system log messages with their recorded time and details.
Theme log View changes made to the active theme.
Request log View bad or redirected requests, such as Page not found (404).
Access log View a list of successful back-end user sign ins.
Log settings Specify which areas should use logging.
Event log Event
Event ID
#2899
Level
Error
Date & Time
Sun, Jun 16, 2019 7:40 PM
Formatted
Raw
BadMethodCallException: The component 'RainLab\Blog\Components\Post' does not contain a method 'getRouter'. in /home/andmorew/public_html/modules/cms/classes/ComponentBase.php:315
Stack trace:
#0 /home/andmorew/public_html/plugins/vdomah/blogviews/Plugin.php(63): Cms\Classes\ComponentBase->__call('getRouter', Array)
#1 [internal function]: Vdomah\BlogViews\Plugin->Vdomah\BlogViews\{closure}(Object(RainLab\Blog\Components\Post))
#2 /home/andmorew/public_html/vendor/october/rain/src/Extension/ExtendableTrait.php(60): call_user_func(Object(Closure), Object(RainLab\Blog\Components\Post))
#3 /home/andmorew/public_html/vendor/october/rain/src/Extension/Extendable.php(31): October\Rain\Extension\Extendable->extendableConstruct()
#4 /home/andmorew/public_html/modules/cms/classes/ComponentBase.php(98): October\Rain\Extension\Extendable->__construct()
#5 [internal function]: Cms\Classes\ComponentBase->__construct(NULL, Array)
#6 /home/andmorew/public_html/vendor/october/rain/src/Foundation/Maker.php(85): ReflectionClass->newInstanceArgs(Array)
#7 /home/andmorew/public_html/vendor/october/rain/src/Foundation/Maker.php(42): October\Rain\Foundation\Maker->build('\\RainLab\\Blog\\C...', Array)
#8 /home/andmorew/public_html/vendor/october/rain/src/Foundation/Application.php(155): October\Rain\Foundation\Maker->make('\\RainLab\\Blog\\C...', Array)
#9 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): October\Rain\Foundation\Application->make('\\RainLab\\Blog\\C...', Array)
#10 /home/andmorew/public_html/modules/cms/classes/ComponentManager.php(213): Illuminate\Support\Facades\Facade::__callStatic('make', Array)
#11 /home/andmorew/public_html/modules/cms/classes/CmsCompoundObject.php(225): Cms\Classes\ComponentManager->makeComponent('blogPost', NULL, Array)
#12 /home/andmorew/public_html/plugins/rainlab/blog/classes/ComponentAbstract.php(35): Cms\Classes\CmsCompoundObject->getComponent('blogPost')
#13 /home/andmorew/public_html/plugins/rainlab/blog/components/Posts.php(222): RainLab\Blog\Classes\ComponentAbstract->getComponent('blogPost', Object(Cms\Classes\Page))
#14 /home/andmorew/public_html/plugins/rainlab/blog/components/Posts.php(169): RainLab\Blog\Components\Posts->listPosts()
#15 /home/andmorew/public_html/modules/cms/classes/CmsCompoundObject.php(172): RainLab\Blog\Components\Posts->onRun()
#16 /home/andmorew/public_html/modules/cms/classes/Controller.php(500): Cms\Classes\CmsCompoundObject->runComponents()
#17 /home/andmorew/public_html/modules/cms/classes/Controller.php(393): Cms\Classes\Controller->execPageCycle()
#18 /home/andmorew/public_html/modules/cms/classes/Controller.php(224): Cms\Classes\Controller->runPage(Object(Cms\Classes\Page))
#19 /home/andmorew/public_html/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run('/')
#20 [internal function]: Cms\Classes\CmsController->run('/')
#21 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#22 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('run', Array)
#23 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Cms\Classes\CmsController), 'run')
#24 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\Routing\Route->runController()
#25 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Route->run()
#26 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#28 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#31 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#34 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#36 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#37 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#40 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#43 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#44 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#45 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#46 /home/andmorew/public_html/vendor/october/rain/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#47 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#48 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#49 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#50 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#53 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#54 /home/andmorew/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#55 /home/andmorew/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#56 {main}
答案 0 :(得分:0)
您可以进入OctoberCMS网站的后端吗?
如果可以,CMS页面上的组件设置是什么?
我将卸载Blog插件。检查您的PHP设置,并确保它正在运行php7.0 +。在安装插件/更新插件之前,可能会增加脚本执行时间。通常,您会收到超时错误,但是如果脚本执行时间太短,我会在各种平台上看到一些不完整的插件/模块/扩展安装。
答案 1 :(得分:0)
我遇到的问题似乎与此处描述的问题非常相似:https://github.com/rainlab/blog-plugin/issues/451
,并可能在此处修复: https://github.com/rainlab/blog-plugin/pull/394
我能够(通过某种方式)通过编辑组件并禁用(暂时)翻译模块来重新获得网站。
由于我不是100%知道自己做了什么,所以我认为问题已解决,但没有解决。
进入下一个错误!