• Resolved John Mulder

    (@john-mulder)


    Hi,

    When building a page on several occasions i get the error message: “this block contains unexpected or invalid content” with a button “Attempt block recovery” Hitting the button resolves the error message. But revisiting the poage leads to the same error message.

    When wanting to change the background image of a row block in mobile only i get the error message “This block has encountered an error and can not be previewed” I can not change the mobile background image.

    All this is only in the backend. The page, where these errors are shown, are fine on the frontend.

    Am i mising a setting or do you have another idea ?

    Best,
    John

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hey,
    Are you an admin user or an author user, or are you on a multisite? WordPress can filter HTML for some users or in multisite environments and this can break blocks because blocks that use icons for example output svg inline icons. There are a few core tickets to fix this but so far nothing has been done so the current best option is to use a plugin to allow your user to post without filtered HTML.

    If that is not the issue can you tell me any steps to recreate the issue where the block is invalid?

    I can’t recreate your issue with the mobile background. Can you tell me what version of WordPress you are using? Can you tell me what you see in the console log?
    https://kadence-theme.com/knowledge-base/troubleshooting/how-to-view-console-log-errors/

    Ben

    Thread Starter John Mulder

    (@john-mulder)

    Hi Ben,

    Thanks for getting back to me.
    I have the administrator role.

    I use WP5.7 on the site and the console log shows no errors, just warnings:

    Expression
    ​
    not available
    Expression
    ​
    Expression
    ​
    not available
    
    content.js:4 [Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
    content.js:5 [Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
    6
    The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.
    DevTools failed to load SourceMap: Could not load content for chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/js/content.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
    
    ​

    Best,
    John

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    Hi,
    Are you checking the console log while in the editor? When a block shows broken Gutenberg automatically kicks out information into the console log. can you make sure to check on an editing page where you are having the issue?

    Ben

    Thread Starter John Mulder

    (@john-mulder)

    Hi Ben,

    The console log shows 98 errors ?
    They all seem similar, like:

    not available
    
    blocks.min.js?ver=9e…f99a4340915b6dc6a:3 Block validation: Block validation failed for <code>kadence/advancedbtn</code> (
    Object
    ).
    
    Content generated by <code>save</code> function:
    
    <div class="wp-block-kadence-advancedbtn kt-btn-align-center kt-btn-tablet-align-inherit kt-btn-mobile-align-inherit kt-btns-wrap kt-btns_8e8acd-94"><div class="kt-btn-wrap kt-btn-wrap-0"><a class="kt-button button kt-btn-0-action kt-btn-size-standard kt-btn-style-basic kt-btn-svg-show-always kt-btn-has-text-true kt-btn-has-svg-false kb-btn-global-inherit wp-block-button__link" href="https://www.masbernadis.eu/wp-staging/eten-en-drinken/"><span class="kt-btn-inner-text">Ontdek meer</span></a></div></div>
    
    Content retrieved from post body:
    
    <div class="wp-block-kadence-advancedbtn kt-btn-align-center kt-btn-tablet-align-inherit kt-btn-mobile-align-inherit kt-btns-wrap kt-btns_8e8acd-94"><div class="kt-btn-wrap kt-btn-wrap-0"><a class="kt-button button kt-btn-0-action kt-btn-size-standard kt-btn-style-basic kt-btn-svg-show-always kt-btn-has-text-true kt-btn-has-svg-false kb-btn-global-inherit wp-block-button__link" href="/wp-staging?page_id=8382"><span class="kt-btn-inner-text">Ontdek meer</span></a></div></div>

    Does this make any sense ?

    Best,
    John

    Plugin Contributor Ben Ritner – Kadence WP

    (@britner)

    That is showing something has converted all your links in the database to relative links. For example:

    href="/wp-staging?page_id=8382"

    But WordPress saves absolute links: href="https://www.example.com/wp-staging?page_id=8382"

    Block validation works by seeing what the block will save into the database if you save the page and seeing what the database has. If those don’t match the block will show broken.

    You have something on your site that is converting the links outside of the editor and in the database.

    Ben

    Thread Starter John Mulder

    (@john-mulder)

    Hi Ben,

    Thanks, i have to do some research on my end then.

    John

    Thread Starter John Mulder

    (@john-mulder)

    Close

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error messages’ is closed to new replies.