mapmaker1
Forum Replies Created
-
This error occurred again for me on a WordPress update. This time the error was logged in woocommerce plugin, but this is probably because of timing when the page is loaded. As devksec has said, it seems to be related to the Spectra block editor, and occurs on my pages where I have used the Spectra tab block. I resolved the issue in the same way as devksec, but I don’t know the root cause which is likely to do with the plugin.
I had to edit
function wp_render_layout_support_flag( $block_content, $block )in public_html/wp-includes/block-supports/layout.php at line 570. The error was $parentLayout being passed as a string instead of an array causing a fatal error. In my modified code the cases where $layout and $parentLayout are not arrays is covered. My modified version is:$layout_0 = $block['attrs']['style']['layout'] ?? array();
$parentLayout_0 = $block['parentLayout'] ?? array();
$layout = is_array( $layout_0 ) ? $layout_0 : array();
if ( ! is_array( $layout_0 ) ) {
error_log( 'Expected $layout to be an array, got: ' . gettype( $layout_0 ) );
}
$parent_layout = is_array( $parentLayout_0 ) ? $parentLayout_0 : array();
if ( ! is_array( $parentLayout_0 ) ) {
error_log( 'Expected $parentLayout to be an array, got: ' . gettype( $parentLayout_0 ) );
}
$container_content_class = wp_unique_id_from_values(
array(
'layout' => array_intersect_key(
$layout,
array_flip( array( 'selfStretch', 'flexSize', 'columnStart', 'columnSpan', 'rowStart', 'rowSpan' ) )
),
'parentLayout' => array_intersect_key(
$parent_layout,
array_flip( array( 'minimumColumnWidth', 'columnCount' ) )
),
),
'wp-container-content-'
);The original version was:
$container_content_class = wp_unique_id_from_values(
array(
'layout' => array_intersect_key(
$block['attrs']['style']['layout'] ?? array(),
array_flip(
array( 'selfStretch', 'flexSize', 'columnStart', 'columnSpan', 'rowStart', 'rowSpan' )
)
),
'parentLayout' => array_intersect_key(
$block['parentLayout'] ?? array(),
array_flip(
array( 'minimumColumnWidth', 'columnCount' )
)
),
),
'wp-container-content-'
);Forum: Plugins
In reply to: [Extensions for Leaflet Map] Track styling and short code issuesMany thanks for the reply. There are errors on the shortcode helper page about not loading pngs from the opentopology map – “Failed to load resource:…”. I think this is for the first example at the top of the page. I’m not concerned about this problem, I just thought I should let you know.
“You can’t influence the color of a track in
multielevation, this is a fixed function.” If one was to go in search of changing these fixed settings, is there a natural place one should start?