Archived topic
weird footer widget behavior
8 replies · Started by Markus on February 13, 2020
Vancouver, we have a problem!
1
If I add an image widget with the Widgets Page (wp-admin/widgets.php) nothing happens.
2
If I add the same image widget with the Customizer (wp-admin/customize.php) the widget is visible in the front end.
But not on the widgets page (wp-admin/widgets.php).
That's fine, but:
3
It is not possible to switch off the footer widget on certain pages/posts.
(Document settings / Footer Widgets / 0 Widgets.)
That's the problem.
4
I tried a workaround with a GP Layout Element.
(Footer Widgets: 0 Widgets).
Same.
I haven't the slightest idea what to do.
Hint: child theme in place.
Hi there,
#1 and #2 sounds like something is broken with WordPress itself. Does the issue remain if you deactivate all of your plugins?
For #3 and #4, do you have any functions in your child theme at all?
Any other Layout Elements?
Jesus! I broke WP! Woah!
#1 and #2
Definitely. Even deactivated GP Premium. No change.
#3 and #4
Yup. This one:
function generatepress_child_enqueue_scripts() {
if ( is_rtl() ) {
wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' );
}
}
add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 );
Other Layout Elements:
Two Hooks, one injecting Faviconcode in the HTML-Head, the other one injecting HTML after header content.
Hmmm.
1. What about if you use a standard Twenty-x theme?
2. When you save the 0 Widgets option and refresh the page in the backend, is the 0 Widgets option still checked?
Answers to 1. + 2.
1. Switched to Twenty Twenty. No change. But I see suddenly a leftover footer widget from the original theme, which I replaced with GP. This was not shown with GP, not in the Customizer, not in the Widgets page.
Next, I switched back to GP, Widget gone. I used the Twenty Twenty Theme and deleted the leftover widget. Went back to GP. No change with the footer widget.
But then I saw an image widget in the Header is missing.
After I added the image widget withe customizer again, I get
Warning: Illegal string offset "width" in /wp-includes/media.php on line 1100
Warning: Illegal string offset "height" in /wp-includes/media.php on line 1101
Lines 1097 to 1101:
function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
if ( $size_name === 'full' ) {
return array(
absint( $image_meta['width'] ),
absint( $image_meta['height'] ),
The image is a SVG with width and height properties set.
This error does not show up in the Customizer.
2. Yes.
______
Thanks for the hint to change the theme. Something low level seems to be broken.
That's one beer for you, Tom.
Hint: do not drink and breastfeed your baby.
_____
Since this is a live environment, I am going to restore a backup and install a site clone to investigate this.
Any idea where to start? I already checked and optimized the database.
Hi there,
1. What if you upload a PNG image? Same error?
2. Any chance you can create a staging server and send me temp login details? I'll have to dig a little deeper to see what's going on here. If so, you can send them through our form here: https://generatepress.com/contact - be sure to mention this topic.
The problem is sitting in front of the computer. Although I have been working with GP for 4 years, I confused Footer Bar Widget with Footer Widget. Sorry.
Glad I could help :)