• Resolved urlund

    (@codework)


    I get this error, when plugin is enabled:

    <b>Fatal error</b>: Uncaught TypeError: addslashes(): Argument #1 ($string) must be of type string, array given in /httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php:136
    Stack trace:
    #0 [internal function]: addslashes()
    #1 /httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php(136): array_map()
    #2 /httpdocs/wp-includes/class-wp-block.php(258): WPGMZA\Integration\Gutenberg-&gt;onRender()
    ...
    #16 {main}
    thrown in <b>/httpdocs/wp-content/plugins/wp-google-maps/includes/3rd-party-integration/class.gutenberg.php</b> on line <b>136</b><br />

    Plugin: v9.0.38
    WP: v6.4.4
    PHP: v8.2.10

    • This topic was modified 5 months, 2 weeks ago by urlund.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author DylanAuty

    (@dylanauty)

    Hey @codework,

    Thank you for taking the time to report this to us, we do appreciate it.

    I’ve logged the error on our side, and we will be implementing a solution to the issue in our next update, which should be released within the next week or so. With that said, I am having some trouble recreating this in one of my development environments, and as such would like to ask for a bit more information.

    As the error indicates a failure in our Gutenberg (block) rendering system, due to an attribute that is being passed from the block to the shortcode builder, I believe something within the block component may be set incorrectly, or in a way that we did not anticipate.

    Do you have a link to the page where this map is being placed (as a block) so that I can run a series of tests on my side to confirm what that might be? Additionally, could I ask you to list the options you have set for your block within the page?

    Thread Starter urlund

    (@codework)

    Hi,

    I’d love to, but as soon as I enable the plugin, I can’t access the page, both frontend and backend throws this error.

    Instead I’ve digged a bit deeper, and it seems to be an incompatibility with the plugin “Widget Options”, since this plugin adds additional attributes to the block.

    Here’s the blocks markup, found in the database:

    <!-- wp:gutenberg-wpgmza/block {"extended_widget_opts":{"id_base":-1,"column":{"desktop":"12","tablet":"12","mobile":"12"},"alignment":{"desktop":"default","tablet":"default","mobile":"default"},"roles":{"state":"","options":"hide"},"visibility":{"selected":"0","options":"hide","acf":{"visibility":"hide","field":"","condition":"","value":""}},"author_page":{"author_pages":{"selections":"1"}},"devices":{"options":"hide"},"days":{"options":"hide"},"dates":{"options":"hide","from":"","to":""},"styling":{"selected":"0","bg_image":"","background":"","background_hover":"","heading":"","text":"","links":"","links_hover":"","border_color":"","border_type":"","border_width":"","background_input":"","text_input":"","border_color_input":"","border_type_input":"","border_width_input":"","background_submit":"","background_submit_hover":"","text_submit":"","border_color_submit":"","border_type_submit":"","border_width_submit":"","list_border_color":"","table_border_color":""},"class":{"selected":"0","link":"","id":"","classes":"","animation":"","event":"enters","speed":"","offset":"","delay":"","logic":""},"tabselect":"0"}} /-->

    I believe that sanitizing the attributes, making sure that only “your own” attributes are processed by the “onRender” method, would make it work as expected.

    Hope this helps.

    Plugin Author DylanAuty

    (@dylanauty)

    Hi @codework,

    Thank you for sharing your findings, that’s a great help. I see what you mean and I agree we shouldn’t be processing additional attributes from other plugins.

    I’m making notes of all of this on our side and we’ll get it fixed in the next update, which we should have ready soon for release.

    I’ll confirm here once we’ve deployed an update to solve this. ??

    Plugin Author DylanAuty

    (@dylanauty)

    We have released an update which resolves this issue. The solution has been validated with “Widget Options” and works well.

    Thank you again for taking the time to report the issue to us.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.