Support » Plugin: Advanced Bootstrap Blocks » TypeError: Cannot add property className

  • Resolved gillespieza

    (@gillespieza)


    I had such high hopes for this plugin.

    I am using the default TwentyTwenty theme with NO other plugins active, and the moment I try to add any BS4 block, I get the following error:

    TypeError: Cannot add property className, object is not extensible
        at ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))) (http://www.mydomain.com/wp-content/plugins/advanced-bootstrap-blocks/dist/blocks.build.js:1:89571)
        at renderWithHooks (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:15246:18)
        at mountIndeterminateComponent (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:17480:13)
        at beginWork$1 (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:18624:16)
        at HTMLUnknownElement.callCallback (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:341:14)
        at Object.invokeGuardedCallbackDev (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:391:16)
        at invokeGuardedCallback (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:448:31)
        at beginWork$$1 (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:23355:7)
        at performUnitOfWork (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:22349:12)
        at workLoopSync (http://www.mydomain.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:22323:22)
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author helpful.dev

    (@helpfuldev)

    @gillespieza, thank you for the feedback. What version of WordPress are you using?

    Plugin Author helpful.dev

    (@helpfuldev)

    Also, could you confirm what browser/operating-system you are running? Thank you!

    Joe

    Plugin Author helpful.dev

    (@helpfuldev)

    For posterity, this seems related to an existing issue:
    https://wordpress.org/support/topic/inserting-any-advanced-bootstrap-blocks-results-in-error/

    However, the person who reported the bug hasn’t followed up and I haven’t been able to recreate the issue in my own environments, but am definitely eager to get this resolved.

    Thread Starter gillespieza

    (@gillespieza)

    Hi. I’m using WP 5.3.2, with Chrome Version 81.0.4044.113 (Official Build) (64-bit) on Windows 10.

    Plugin Author helpful.dev

    (@helpfuldev)

    Hey @gillespieza, I appreciate you getting back to me here. Unfortunately I am not yet able to reproduce the issue–running WP 5.3.2 in Chrome 81.x (latest release) on Windows 10.

    Do you have any browser extensions installed/enabled which could be interfering? Along these lines, installing the “React Dev Tools” browser extension for Chrome may be able to provide more information about the underlying cause.

    If you haven’t already, you might try deactivating/deleting the plugin and re-installing the latest.

    I’d be curious to know if this happens for you in other browsers (firefox or edge?) Of course, since this isn’t working for you at all, I’m grateful as it stands for the info you’ve already provided. At least this lets me know there’s something to work through moving forward.

    Thanks again,
    Joe

    Thread Starter gillespieza

    (@gillespieza)

    Hi there

    I think this might have something to do with my development environment. It also happens in Firefox, but not on sites that are live. Just one development site that I have on localhost (using a Virtual Host).

    On that site, the error happens in both Chrome and Firefox, even with all extensions disabled. Also, with no WP plugins enabled, and using the 2020 default theme.

    I’ve installed the React chrome extension, and these errors appear in the console on page load, before any attempt to add a block:

    
    Warning: Invalid DOM property 'fill-rule'. Did you mean 'fillRule'?
        in path
        in svg (created by SVG)
        in SVG (created by Icon)
        in Icon (created by BlockIcon)
        in span (created by BlockIcon)
        in BlockIcon (created by InserterWithShortcuts)
        in button (created by ForwardRef(Button))
        in ForwardRef(Button) (created by ForwardRef(IconButton))
        in Tooltip (created by ForwardRef(IconButton))
        in ForwardRef(IconButton) (created by InserterWithShortcuts)
        in div (created by InserterWithShortcuts)
        in InserterWithShortcuts (created by WithDispatch(InserterWithShortcuts))
        in WithDispatch(InserterWithShortcuts)
        in Unknown (created by WithSelect(WithDispatch(InserterWithShortcuts)))
        in WithSelect(WithDispatch(InserterWithShortcuts)) (created by default_block_appender_DefaultBlockAppender)
        in div (created by default_block_appender_DefaultBlockAppender)
        in default_block_appender_DefaultBlockAppender (created by WithDispatch(default_block_appender_DefaultBlockAppender))
        in WithDispatch(default_block_appender_DefaultBlockAppender)
        in Unknown (created by WithSelect(WithDispatch(default_block_appender_DefaultBlockAppender)))
        in WithSelect(WithDispatch(default_block_appender_DefaultBlockAppender)) (created by WithState(WithSelect(WithDispatch(default_block_appender_DefaultBlockAppender))))
        in WithState(WithSelect(WithDispatch(default_block_appender_DefaultBlockAppender))) (created by BlockListAppender)
        in div (created by IgnoreNestedEvents)
        in IgnoreNestedEvents (created by ForwardRef(IgnoreNestedEvents))
        in ForwardRef(IgnoreNestedEvents) (created by BlockListAppender)
        in div (created by BlockListAppender)
        in BlockListAppender
        in Unknown (created by WithSelect(BlockListAppender))
        in WithSelect(BlockListAppender) (created by BlockList)
        in div (created by BlockList)
        in BlockList (created by WithDispatch(BlockList))
        in WithDispatch(BlockList)
        in Unknown (created by WithSelect(WithDispatch(BlockList)))
        in WithSelect(WithDispatch(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 WithDispatch(WithSafeTimeout(ObserveTyping)))
        in WithDispatch(WithSafeTimeout(ObserveTyping))
        in Unknown (created by WithSelect(WithDispatch(WithSafeTimeout(ObserveTyping))))
        in WithSelect(WithDispatch(WithSafeTimeout(ObserveTyping))) (created by VisualEditor)
        in div (created by WritingFlow)
        in div (created by WritingFlow)
        in WritingFlow (created by WithDispatch(WritingFlow))
        in WithDispatch(WritingFlow)
        in Unknown (created by WithSelect(WithDispatch(WritingFlow)))
        in WithSelect(WithDispatch(WritingFlow)) (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 Layout)
        in div (created by FocusReturnProvider)
        in FocusReturnProvider (created by Layout)
        in Layout
        in Unknown (created by WithViewportMatch(Layout))
        in WithViewportMatch(Layout) (created by NavigateRegions(WithViewportMatch(Layout)))
        in div (created by NavigateRegions(WithViewportMatch(Layout)))
        in NavigateRegions(WithViewportMatch(Layout)) (created by WithDispatch(NavigateRegions(WithViewportMatch(Layout))))
        in WithDispatch(NavigateRegions(WithViewportMatch(Layout)))
        in Unknown (created by WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(Layout)))))
        in WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(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 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 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))
    

    There is a similar warning for:

    
    react_devtools_backend.js:6 Warning: Invalid DOM property 'clip-rule'. Did you mean 'clipRule'?<code>and</code>Warning: Invalid DOM property 'class'. Did you mean 'className'?

    Additional errors (quite long, I haven’t pasted the entire message but I could if needed):

    
    Warning: Each child in a list should have a unique "key" prop.
    

    Then, when I try to add the Block, I get the following React errors in the console:

    
    blocks.build.js:1 Uncaught TypeError: Cannot add property className, object is not extensible
        at ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))) (blocks.build.js:1)
        at renderWithHooks (react-dom.js?ver=16.9.0:15246)
        at mountIndeterminateComponent (react-dom.js?ver=16.9.0:17480)
        at beginWork$1 (react-dom.js?ver=16.9.0:18624)
        at HTMLUnknownElement.callCallback (react-dom.js?ver=16.9.0:341)
        at Object.invokeGuardedCallbackDev (react-dom.js?ver=16.9.0:391)
        at invokeGuardedCallback (react-dom.js?ver=16.9.0:448)
        at beginWork$$1 (react-dom.js?ver=16.9.0:23355)
        at performUnitOfWork (react-dom.js?ver=16.9.0:22346)
        at workLoopSync (react-dom.js?ver=16.9.0:22323)
    

    and

    
    The above error occurred in the <ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))> component:
        in ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))) (created by ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))
        in ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))) (created by ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))))
        in ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))) (created by ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))))
        in ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))) (created by ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))))))
        in ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))))) (created by ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))))))
        in ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))))) (created by ModifyBlockListBlockCardBody(ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))))))))
        in ModifyBlockListBlockCardBody(ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock))))))))) (created by ModifyBlockListBlockCardFooter(ModifyBlockListBlockCardBody(ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((block_BlockListBlock)))))))))))
        in ModifyBlockListBlockCardFooter(ModifyBlockListBlockCardBody(ModifyBlockListBlockCardHeader(ModifyBlockListBlockCard(ModifyBlockListBlockButtonGroup(ModifyBlockListBlockColumn(ModifyBlockListBlockRow(ModifyBlockListBlockContainer(ModifyBlockListBlockContainer((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 BlockAsyncModeProvider (created by BlockList)
        in div (created by BlockList)
        in BlockList (created by WithDispatch(BlockList))
        in WithDispatch(BlockList)
        in Unknown (created by WithSelect(WithDispatch(BlockList)))
        in WithSelect(WithDispatch(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 WithDispatch(WithSafeTimeout(ObserveTyping)))
        in WithDispatch(WithSafeTimeout(ObserveTyping))
        in Unknown (created by WithSelect(WithDispatch(WithSafeTimeout(ObserveTyping))))
        in WithSelect(WithDispatch(WithSafeTimeout(ObserveTyping))) (created by VisualEditor)
        in div (created by WritingFlow)
        in div (created by WritingFlow)
        in WritingFlow (created by WithDispatch(WritingFlow))
        in WithDispatch(WritingFlow)
        in Unknown (created by WithSelect(WithDispatch(WritingFlow)))
        in WithSelect(WithDispatch(WritingFlow)) (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 Layout)
        in div (created by FocusReturnProvider)
        in FocusReturnProvider (created by Layout)
        in Layout
        in Unknown (created by WithViewportMatch(Layout))
        in WithViewportMatch(Layout) (created by NavigateRegions(WithViewportMatch(Layout)))
        in div (created by NavigateRegions(WithViewportMatch(Layout)))
        in NavigateRegions(WithViewportMatch(Layout)) (created by WithDispatch(NavigateRegions(WithViewportMatch(Layout))))
        in WithDispatch(NavigateRegions(WithViewportMatch(Layout)))
        in Unknown (created by WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(Layout)))))
        in WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(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 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 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, ErrorBoundary.
    
    Plugin Author helpful.dev

    (@helpfuldev)

    @gillespieza not sure if you’re still interested in this fix. If you are, I think the latest (v1.3) should resolve the SVG-related errors for you. I’m going to mark this as resolved but please feel free to re-open if this/these errors noted above persist after updating.

    Thank you,
    Joe

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TypeError: Cannot add property className’ is closed to new replies.