如何调试古腾堡wordpress中的区块?

问题描述 投票:1回答:1

我正在为Gutenberg wordpress建立一个新的区块,当我收到错误时,我无法知道是什么问题。有什么调试区块的步骤吗?如何获得更具体的错误信息?

我在chrome上有react开发工具。我搜索了一下,没有古腾堡wordpress的调试块的信息。

下面是我得到的错误,不知道该怎么处理。

react.js?ver=16.9.0:1233 Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {icon, upload, swap, remove}). If you meant to render a collection of children, use an array instead.
    in Tooltip (created by edit)
    in div (created by ToolbarGroupContainer)
    in ToolbarGroupContainer (created by ToolbarGroup)
    in ToolbarGroup (created by toolbar_Toolbar)
    in toolbar_Toolbar (created by edit)
    in bubbles_virtually_fill_Fill (created by slot_fill_Fill)
    in slot_fill_Fill (created by BlockControlsFill)
    in BlockControlsFill (created by BlockControlsFill)
    in BlockControlsFill (created by Context.Consumer)
    in IfBlockEditSelected(BlockControlsFill) (created by ForwardRef)
    in ForwardRef (created by edit)
    in div (created by edit)
    in div (created by edit)
    in div (created by edit)
    in section (created by edit)
    in div (created by edit)
    in edit (created by Edit)
    in Edit (created by WithToolbarControls(Edit))
    in WithToolbarControls(Edit) (created by WithInspectorControl(WithToolbarControls(Edit)))
    in WithInspectorControl(WithToolbarControls(Edit)) (created by WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))
    in WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))
    in Unknown (created by WithDispatch(Component))
    in WithDispatch(Component)
    in Unknown (created by WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))
    in WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) (created by WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))
    in WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) (created by WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))
    in WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))) (created by WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))
    in WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))) (created by WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))
    in WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))) (created by WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))
    in WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))) (created by WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))))
    in WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))) (created by PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))))
    in PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))) (created by WithFilters(Edit))
    in WithFilters(Edit) (created by BlockEdit)
    in BlockEdit (created by block_BlockListBlock)
    in BlockCrashBoundary (created by block_BlockListBlock)
    in div (created by ForwardRef)
    in ForwardRef (created by block_BlockListBlock)
    in block_BlockListBlock (created by (block_BlockListBlock))
    in (block_BlockListBlock)
    in Unknown
    in Unknown (created by WithFontSettings((block_BlockListBlock)))
    in WithFontSettings((block_BlockListBlock))
    in Unknown
    in Unknown (created by AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock))))
    in AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))
    in Unknown
    in Unknown (created by AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))))
    in AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))) (created by WithFilters(block_BlockListBlock))
    in WithFilters(block_BlockListBlock) (created by IfCondition(WithFilters(block_BlockListBlock)))
    in IfCondition(WithFilters(block_BlockListBlock)) (created by WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
    in WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))
    in Unknown (created by WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))
    in WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
    in Unknown (created by Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))))
    in Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))) (created by BlockList)
    in div (created by ForwardRef(RootContainer))
    in div (created by InsertionPoint)
    in InsertionPoint (created by ForwardRef(RootContainer))
    in ForwardRef(RootContainer) (created by BlockList)
    in BlockList
    in Unknown (created by VisualEditor)
    in div (created by CopyHandler)
    in CopyHandler (created by WithDispatch(CopyHandler))
    in WithDispatch(CopyHandler) (created by VisualEditor)
    in div (created by ObserveTyping)
    in ObserveTyping (created by WithSafeTimeout(ObserveTyping))
    in WithSafeTimeout(ObserveTyping) (created by VisualEditor)
    in div (created by WritingFlow)
    in div (created by WritingFlow)
    in WritingFlow (created by VisualEditor)
    in div (created by CopyHandler)
    in CopyHandler (created by WithDispatch(CopyHandler))
    in WithDispatch(CopyHandler) (created by VisualEditor)
    in div (created by Typewriter)
    in Typewriter
    in Unknown (created by WithSelect(Typewriter))
    in WithSelect(Typewriter) (created by VisualEditor)
    in div (created by BlockSelectionClearer)
    in BlockSelectionClearer (created by WithDispatch(BlockSelectionClearer))
    in WithDispatch(BlockSelectionClearer)
    in Unknown (created by WithSelect(WithDispatch(BlockSelectionClearer)))
    in WithSelect(WithDispatch(BlockSelectionClearer)) (created by VisualEditor)
    in VisualEditor (created by Layout)
    in div (created by EditorSkeleton)
    in div (created by EditorSkeleton)
    in div (created by EditorSkeleton)
    in EditorSkeleton (created by NavigateRegions(EditorSkeleton))
    in div (created by NavigateRegions(EditorSkeleton))
    in NavigateRegions(EditorSkeleton) (created by Layout)
    in div (created by FocusReturnProvider)
    in FocusReturnProvider (created by Layout)
    in Layout (created by Editor)
    in ErrorBoundary (created by Editor)
    in BlockEditorProvider (created by WithDispatch(BlockEditorProvider))
    in WithDispatch(BlockEditorProvider)
    in Unknown (created by Context.Consumer)
    in WithRegistryProvider(WithDispatch(BlockEditorProvider)) (created by EditorProvider)
    in EntityProvider (created by EditorProvider)
    in EntityProvider (created by EditorProvider)
    in EditorProvider (created by WithDispatch(EditorProvider))
    in WithDispatch(EditorProvider)
    in Unknown (created by WithSelect(WithDispatch(EditorProvider)))
    in WithSelect(WithDispatch(EditorProvider))
    in Unknown (created by Context.Consumer)
    in WithRegistryProvider(WithSelect(WithDispatch(EditorProvider))) (created by Editor)
    in div (created by DropZoneProvider)
    in DropZoneProvider (created by Editor)
    in slot_fill_provider_SlotFillProvider (created by SlotFillProvider)
    in SlotFillProvider (created by Editor)
    in StrictMode (created by Editor)
    in Editor (created by WithDispatch(Editor))
    in WithDispatch(Editor)
    in Unknown (created by WithSelect(WithDispatch(Editor)))
    in WithSelect(WithDispatch(Editor))
    at https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1233:30
    at traverseAllChildrenImpl (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1236:9)
    at traverseAllChildren (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1264:10)
    at Object.forEachChildren [as forEach] (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1309:3)
    at https://tatifrank.com/wp-includes/js/dist/element.js?ver=a7bf20c…:884:38
    at Array.reduce (<anonymous>)
    at concatChildren (https://tatifrank.com/wp-includes/js/dist/element.js?ver=a7bf20c…:883:28)
    at Tooltip.render (https://tatifrank.com/wp-includes/js/dist/components.js?ver=90861a4…:10616:92)
    at finishClassComponent (https://tatifrank.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:17177:31)
    at updateClassComponent (https://tatifrank.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:17132:24)
(anonymous) @   react.js?ver=16.9.0:1233
traverseAllChildrenImpl @   react.js?ver=16.9.0:1236
traverseAllChildren @   react.js?ver=16.9.0:1264
forEachChildren @   react.js?ver=16.9.0:1309
(anonymous) @   element.js?ver=a7bf2…c65111e966d5592:884
concatChildren  @   element.js?ver=a7bf2…c65111e966d5592:883
render  @   components.js?ver=90…d6750cb7ae6f4:10616
finishClassComponent    @   react-dom.js?ver=16.9.0:17177
updateClassComponent    @   react-dom.js?ver=16.9.0:17132
beginWork$1 @   react-dom.js?ver=16.9.0:18643
callCallback    @   react-dom.js?ver=16.9.0:341
invokeGuardedCallbackDev    @   react-dom.js?ver=16.9.0:391
invokeGuardedCallback   @   react-dom.js?ver=16.9.0:448
beginWork$$1    @   react-dom.js?ver=16.9.0:23355
performUnitOfWork   @   react-dom.js?ver=16.9.0:22346
workLoopSync    @   react-dom.js?ver=16.9.0:22323
renderRoot  @   react-dom.js?ver=16.9.0:22016
runRootCallback @   react-dom.js?ver=16.9.0:21692
(anonymous) @   react-dom.js?ver=16.9.0:11491
unstable_runWithPriority    @   react.js?ver=16.9.0:2820
runWithPriority$2   @   react-dom.js?ver=16.9.0:11443
flushSyncCallbackQueueImpl  @   react-dom.js?ver=16.9.0:11487
flushSyncCallbackQueue  @   react-dom.js?ver=16.9.0:11476
discreteUpdates$1   @   react-dom.js?ver=16.9.0:21815
discreteUpdates @   react-dom.js?ver=16.9.0:2357
dispatchDiscreteEvent   @   react-dom.js?ver=16.9.0:6104
react_devtools_backend.js:6 The above error occurred in the <Tooltip> component:
    in Tooltip (created by edit)
    in div (created by ToolbarGroupContainer)
    in ToolbarGroupContainer (created by ToolbarGroup)
    in ToolbarGroup (created by toolbar_Toolbar)
    in toolbar_Toolbar (created by edit)
    in bubbles_virtually_fill_Fill (created by slot_fill_Fill)
    in slot_fill_Fill (created by BlockControlsFill)
    in BlockControlsFill (created by BlockControlsFill)
    in BlockControlsFill (created by Context.Consumer)
    in IfBlockEditSelected(BlockControlsFill) (created by ForwardRef)
    in ForwardRef (created by edit)
    in div (created by edit)
    in div (created by edit)
    in div (created by edit)
    in section (created by edit)
    in div (created by edit)
    in edit (created by Edit)
    in Edit (created by WithToolbarControls(Edit))
    in WithToolbarControls(Edit) (created by WithInspectorControl(WithToolbarControls(Edit)))
    in WithInspectorControl(WithToolbarControls(Edit)) (created by WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))
    in WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))
    in Unknown (created by WithDispatch(Component))
    in WithDispatch(Component)
    in Unknown (created by WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))
    in WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) (created by WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))
    in WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) (created by WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))
    in WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))) (created by WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))
    in WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))) (created by WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))
    in WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))) (created by WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))
    in WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))) (created by WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))))
    in WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))) (created by PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))))
    in PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))) (created by WithFilters(Edit))
    in WithFilters(Edit) (created by BlockEdit)
    in BlockEdit (created by block_BlockListBlock)
    in BlockCrashBoundary (created by block_BlockListBlock)
    in div (created by ForwardRef)
    in ForwardRef (created by block_BlockListBlock)
    in block_BlockListBlock (created by (block_BlockListBlock))
    in (block_BlockListBlock)
    in Unknown
    in Unknown (created by WithFontSettings((block_BlockListBlock)))
    in WithFontSettings((block_BlockListBlock))
    in Unknown
    in Unknown (created by AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock))))
    in AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))
    in Unknown
    in Unknown (created by AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))))
    in AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))) (created by WithFilters(block_BlockListBlock))
    in WithFilters(block_BlockListBlock) (created by IfCondition(WithFilters(block_BlockListBlock)))
    in IfCondition(WithFilters(block_BlockListBlock)) (created by WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
    in WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))
    in Unknown (created by WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))
    in WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
    in Unknown (created by Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))))
    in Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))) (created by BlockList)
    in div (created by ForwardRef(RootContainer))
    in div (created by InsertionPoint)
    in InsertionPoint (created by ForwardRef(RootContainer))
    in ForwardRef(RootContainer) (created by BlockList)
    in BlockList
    in Unknown (created by VisualEditor)
    in div (created by CopyHandler)
    in CopyHandler (created by WithDispatch(CopyHandler))
    in WithDispatch(CopyHandler) (created by VisualEditor)
    in div (created by ObserveTyping)
    in ObserveTyping (created by WithSafeTimeout(ObserveTyping))
    in WithSafeTimeout(ObserveTyping) (created by VisualEditor)
    in div (created by WritingFlow)
    in div (created by WritingFlow)
    in WritingFlow (created by VisualEditor)
    in div (created by CopyHandler)
    in CopyHandler (created by WithDispatch(CopyHandler))
    in WithDispatch(CopyHandler) (created by VisualEditor)
    in div (created by Typewriter)
    in Typewriter
    in Unknown (created by WithSelect(Typewriter))
    in WithSelect(Typewriter) (created by VisualEditor)
    in div (created by BlockSelectionClearer)
    in BlockSelectionClearer (created by WithDispatch(BlockSelectionClearer))
    in WithDispatch(BlockSelectionClearer)
    in Unknown (created by WithSelect(WithDispatch(BlockSelectionClearer)))
    in WithSelect(WithDispatch(BlockSelectionClearer)) (created by VisualEditor)
    in VisualEditor (created by Layout)
    in div (created by EditorSkeleton)
    in div (created by EditorSkeleton)
    in div (created by EditorSkeleton)
    in EditorSkeleton (created by NavigateRegions(EditorSkeleton))
    in div (created by NavigateRegions(EditorSkeleton))
    in NavigateRegions(EditorSkeleton) (created by Layout)
    in div (created by FocusReturnProvider)
    in FocusReturnProvider (created by Layout)
    in Layout (created by Editor)
    in ErrorBoundary (created by Editor)
    in BlockEditorProvider (created by WithDispatch(BlockEditorProvider))
    in WithDispatch(BlockEditorProvider)
    in Unknown (created by Context.Consumer)
    in WithRegistryProvider(WithDispatch(BlockEditorProvider)) (created by EditorProvider)
    in EntityProvider (created by EditorProvider)
    in EntityProvider (created by EditorProvider)
    in EditorProvider (created by WithDispatch(EditorProvider))
    in WithDispatch(EditorProvider)
    in Unknown (created by WithSelect(WithDispatch(EditorProvider)))
    in WithSelect(WithDispatch(EditorProvider))
    in Unknown (created by Context.Consumer)
    in WithRegistryProvider(WithSelect(WithDispatch(EditorProvider))) (created by Editor)
    in div (created by DropZoneProvider)
    in DropZoneProvider (created by Editor)
    in slot_fill_provider_SlotFillProvider (created by SlotFillProvider)
    in SlotFillProvider (created by Editor)
    in StrictMode (created by Editor)
    in Editor (created by WithDispatch(Editor))
    in WithDispatch(Editor)
    in Unknown (created by WithSelect(WithDispatch(Editor)))
    in WithSelect(WithDispatch(Editor))

React will try to recreate this component tree from scratch using the error boundary you provided, BlockCrashBoundary.
r @ react_devtools_backend.js:6
logCapturedError @ react-dom.js?ver=16.9.0:19952
logError @ react-dom.js?ver=16.9.0:19988
callback @ react-dom.js?ver=16.9.0:21099
callCallback @ react-dom.js?ver=16.9.0:13067
commitUpdateEffects @ react-dom.js?ver=16.9.0:13106
commitUpdateQueue @ react-dom.js?ver=16.9.0:13097
commitLifeCycles @ react-dom.js?ver=16.9.0:20217
commitLayoutEffects @ react-dom.js?ver=16.9.0:22951
callCallback @ react-dom.js?ver=16.9.0:341
invokeGuardedCallbackDev @ react-dom.js?ver=16.9.0:391
invokeGuardedCallback @ react-dom.js?ver=16.9.0:448
commitRootImpl @ react-dom.js?ver=16.9.0:22723
unstable_runWithPriority @ react.js?ver=16.9.0:2820
runWithPriority$2 @ react-dom.js?ver=16.9.0:11443
commitRoot @ react-dom.js?ver=16.9.0:22552
runRootCallback @ react-dom.js?ver=16.9.0:21692
(anonymous) @ react-dom.js?ver=16.9.0:11491
unstable_runWithPriority @ react.js?ver=16.9.0:2820
runWithPriority$2 @ react-dom.js?ver=16.9.0:11443
flushSyncCallbackQueueImpl @ react-dom.js?ver=16.9.0:11487
flushSyncCallbackQueue @ react-dom.js?ver=16.9.0:11476
discreteUpdates$1 @ react-dom.js?ver=16.9.0:21815
discreteUpdates @ react-dom.js?ver=16.9.0:2357
dispatchDiscreteEvent @ react-dom.js?ver=16.9.0:6104
javascript reactjs wordpress wordpress-gutenberg gutenberg-blocks
1个回答
0
投票

在古腾堡中调试有几个东西。

你已经在浏览器中安装了react开发工具:)

现在在你的WordPress安装中(你的网站),有wp-config.php。

添加 以下为其内容:

define( 'SCRIPT_DEBUG', true );

这将会加载脱敏版本的WordPress核心JS文件。

define( 'WP_DEBUG', true );

这将导致所有与php相关的错误,通知和错误显示。虽然Gutenberg是基于react和javascript的,但它与PHP有相当大的关系,如果你正在制作动态块,它特别有用。不要在生产中使用这个设置。

其次,Gutenberg还在经历一些比较快的变化,它还是比较新的,而且它的文档也不是最棒的,所以请检查一下 其问题跟踪器在github上 看看是否有人已经遇到了类似的问题;它可能在古腾堡的新版本中得到了修复。

WordPress也发布了 古腾堡作为一个插件 而且该插件是比WordPress默认包含的版本更新的版本。您可以安装这个插件,您的WordPress网站将使用较新版本的Gutenberg,这可能会修复一个问题。

其次,这似乎是一个javascript错误,而不是针对古腾堡的。看起来你只是传递了一个对象,但代码却期望用一个数组来代替,但这可能意味着一个 几种不同的原因.

我没有看到其余的代码,所以我无法确定,也无法提供更多帮助。

© www.soinside.com 2019 - 2024. All rights reserved.