Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Fix Feedzy RSS block fatal error with lazy loading (#165) - #169

Open
medgedecastro wants to merge 2 commits into
masterfrom
issue/165
Open

medgedecastro wants to merge 2 commits into
masterfrom
issue/165

Conversation

@medgedecastro

Copy link
Copy Markdown
Contributor

Fixes #165

Summary

Fixes a compatibility issue with Feedzy RSS Feeds. A page with a Feedzy RSS block and lazy loading enabled fails with Object of class stdClass could not be converted to string while Widget Options is active. The same fatal blocks saving the page in the editor.

Cause

Widget Options registers extended_widget_opts and extended_widget_opts_block on all blocks with (object)[] defaults. Feedzy's lazy-load loop (feedzy-rss-feeds-admin-abstract.php, around lines 451-463) only calls implode() on arrays, then passes every other value to esc_attr(). A stdClass default therefore causes a fatal.

Changes

  • includes/widgets/gutenberg/gutenberg-toolbar.php
    • Feedzy blocks (any block name containing feedzy) now register the two attributes without a default, like the existing Jetpack branch.
    • Feedzy blocks also get a wrapped render_callback that removes extended_widget_opts and extended_widget_opts_block before Feedzy renders. This avoids "Array to string conversion" warnings and stops Widget Options data from being added to Feedzy's lazy-load data-* attributes.

medgedecastro and others added 2 commits November 14, 2026 16:09
Widget Options registered extended_widget_opts and
extended_widget_opts_block on every block with an (object)[] default.
Feedzy's lazy-loading loop passes block attributes to esc_attr(), so the
stdClass default caused "Object of class stdClass could not be converted
to string", including when saving a page in the editor.

- Register the two attributes on Feedzy blocks without a default, the
  same way Jetpack blocks are handled.
- Wrap the Feedzy render_callback to remove the Widget Options
  attributes before Feedzy renders, which avoids "Array to string
  conversion" warnings when block options are set.
@medgedecastro medgedecastro changed the title Issue/165 Fix Feedzy RSS block fatal error with lazy loading (#165) Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedzy lazy-loaded blocks fail when Widget Options adds object attributes

1 participant