Description

Seems that the template is not checking if data.attachment.sizes.full exists before printing out data.attachment.sizes.full.url. This causes a console error (trying to get property url from a non-object).

Change History (23)

at eval (eval at m.template (underscore.min.js?ver=1.8.3:5), <anonymous>:23:35)
at c (underscore.min.js?ver=1.8.3:5)
at wp-util.js?ver=4.8-alpha-40139:34
at child.renderContent (customize-controls.js?ver=4.8-alpha-40139:2223)
at Object.<anonymous> (customize-controls.js?ver=4.8-alpha-40139:1974)
at i (jquery.js?ver=1.12.4:2)
at Object.add [as done] (jquery.js?ver=1.12.4:2)
at Function.<anonymous> (customize-controls.js?ver=4.8-alpha-40139:1970)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)

@aussieguy123 also, if you open up your console, what does _wpCustomizeSettings.controls.site_icon.attachment output? I'm expecting it to have an empty sizes property. But I want to know what the other properties are as well. Please attach the JSON.

here is the output of _wpCustomizeSettings.controls.site_icon.attachment . Sizes is actually not empty, but the "full" size is missing.

The fix addresses the symptom. If the root cause is no full size being generated, that should be fixed seperately.

You are right that jetpack is involved. Deactivating jetpack (wp plugin deactivate jetpack --network) works around the problem. The other way around it is to delete the site_icon option ( wp --url=<yoursite.local> option delete site_icon ).

@aussieguy123 I think 40010.1.diff​ is a better approach for fixing the symptom you're experiencing. Nevertheless, I am unsure as to why the full size would be undefined. Since this has only been reported in the context of WordPress.com I'd suggest looping in a VIP code wrangler to identify the root cause.

Can you try selectively activating Jetpack modules to identify which module specifically is causing the problem when the plugin is active? I created a Jetpack issue for you and I suggest you follow up there to identify the root cause with the Jetpack team: ​https://github.com/Automattic/jetpack/issues/6683

Once the root cause is identified, either a fix for Jetpack will ensue and we can close this ticket, or we'll confirm the need for committing a patch for this to core.

We have a plugin which is removing the 'full' size via the 'wp_prepare_attachment_for_js' filter.

This is what triggers the bug. Either my patch or Weston's patch should fix the front end in cases like ours where the 'full' size is removed. I think one should be applied (VIP also suggested this in our support ticket), since its good practice to check if the size exists before using it.