Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Fizzie to cater for changes in Gutenberg 10.7.1 #68

Closed
bobbingwide opened this issue May 26, 2021 · 5 comments
Closed

Update Fizzie to cater for changes in Gutenberg 10.7.1 #68

bobbingwide opened this issue May 26, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented May 26, 2021

I've just updated Gutenberg to v10.7.1 and found some additional problems, over and above the problems with 10.6 ( See #67 ).

  1. Featured images are tiny in archive-block.html, archive-oik-plugins.html and archive-oik-themes.html
    image
<figure class="wp-block-post-featured-image">
<a href="https://blocks.wp.a2z/block/columns-core-columns/100-core-columns/">
<img width="64" height="13" src="https://blocks.wp.a2z/wp-content/uploads/sites/10/2019/01/core-columns-block-initial.jpg" 
class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="" loading="lazy" 
srcset="https://blocks.wp.a2z/wp-content/uploads/sites/10/2019/01/core-columns-block-initial.jpg 632w, 
https://blocks.wp.a2z/wp-content/uploads/sites/10/2019/01/core-columns-block-initial-300x62.jpg 300w"
 sizes="(max-width: 64px) 100vw, 64px">
</a>
</figure>
@bobbingwide bobbingwide added the bug Something isn't working label May 26, 2021
@bobbingwide bobbingwide self-assigned this May 26, 2021
@bobbingwide
Copy link
Owner Author

bobbingwide commented May 30, 2021

Additionally, when using the version built from Gutenberg source just about everything on the home page is left aligned.
The alignment was fine with the runtime version from wordpress.org

@bobbingwide
Copy link
Owner Author

The width and height of 64 pixels is happening during wp_constrain_dimensions processing,


C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php(618:0) bw_trace_backtrace(2) 93 0 2021-06-01T09:27:17+00:00 0.700483 0.000128 cf=wp_constrain_dimensions 17115 54 1635 6291456/6291456 512M F=763 5 Array

    [0] => Array

        [0] => (integer) 64
        [1] => (integer) 64

    [1] => (integer) 150
    [2] => (integer) 150
    [3] => (integer) 64
    [4] => (integer) 0

0. bw_lazy_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bwtrace.php:108 0
1. bw_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php:619 0
2. bw_trace_backtrace(array,150,150,64,0) C:\apache\htdocs\wp-a2z\wp-includes\class-wp-hook.php:292 5
3. apply_filters(array,array) C:\apache\htdocs\wp-a2z\wp-includes\plugin.php:212 2
4. apply_filters(wp_constrain_dimensions,array,150,150,64,0) C:\apache\htdocs\wp-a2z\wp-includes\media.php:510 6
5. wp_constrain_dimensions(150,150,64) C:\apache\htdocs\wp-a2z\wp-includes\media.php:721 3
6. wp_image_matches_ratio(64,64,150,150) C:\apache\htdocs\wp-a2z\wp-includes\media.php:1384 4
7. wp_calculate_image_srcset(array,https://blocks.wp.a2z/wp-content/uploads/sites/10/2019/01/blocks-wp-a2z-icon-256x256.jpg,array,4) C:\apache\htdocs\wp-a2z\wp-includes\media.php:1074 4
8. wp_get_attachment_image(4,post-thumbnail,,array) C:\apache\htdocs\wp-a2z\wp-includes\post-thumbnail-template.php:182 4
9. get_the_post_thumbnail(object) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\post-featured-image.php:22 1
10. gutenberg_render_block_core_post_featured_image(array,,object) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat.php:163 3
11. {closure}(array,,object) C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php:221 3
12. render C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php:211 0
13. render(array) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\query-loop.php:63 1
14. gutenberg_render_block_core_query_loop(array,,object) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat.php:163 3
15. {closure}(array,,object) C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php:221 3
16. render C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php:211 0
17. render C:\apache\htdocs\wp-a2z\wp-includes\blocks.php:799 0
18. render_block(array) C:\apache\htdocs\wp-a2z\wp-includes\blocks.php:837 1
19. do_blocks(<!-- wp:query {"queryId":11,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"backgroundColor":"background","layout":{"inherit":true}} -->
<div class="wp-block-query has-background-background-color has-background"><!-- wp:query-loop -->
<!-- wp:post-title /-->

<!-- wp:post-featured-image {"isLink":true} /-->

<!-- wp:paragraph -->
<p>sb</p>
<!-- /wp:paragraph -->
<!-- /wp:query-loop --></div>
<!-- /wp:query -->

<!-- wp:query-pagination-numbers /-->) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\build\block-library\blocks\template-part.php:99 1
20. gutenberg_render_block_core_template_part(array,,object) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat.php:163 3
21. {closure}(array,,object) C:\apache\htdocs\wp-a2z\wp-includes\class-wp-block.php:221 3
22. render C:\apache\htdocs\wp-a2z\wp-includes\blocks.php:799 0
23. render_block(array) C:\apache\htdocs\wp-a2z\wp-includes\blocks.php:837 1
24. do_blocks(<!-- wp:html -->
<div class="WP_DEBUG">archive-block.html</div>
<!-- /wp:html -->

<!-- wp:template-part {"slug":"header","theme":"fizzie","tagName":"header","align":"full"} /-->

<!-- wp:template-part {"slug":"a2z-pagination-block","theme":"fizzie","layout":{"inherit":true}} /-->

<!-- wp:template-part {"slug":"breadcrumbs","theme":"fizzie","className":"breadcrumbs","layout":{"inherit":true}} /-->

<!-- wp:template-part {"slug":"archive-query","theme":"fizzie","tagName":"section","className":"archive","layout":{"contentSize":"80%","wideSize":"90%"}} /-->

<!-- wp:template-part {"slug":"search","theme":"fizzie","layout":{"inherit":true}} /-->

<!-- wp:template-part {"slug":"page-footer","theme":"fizzie","tagName":"footer","layout":{"inherit":true}} /-->

<!-- wp:template-part {"slug":"footer","theme":"fizzie"} /-->

<!-- wp:template-part {"slug":"footer-menu","theme":"fizzie","className":"footer-menu"} /-->) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\full-site-editing\template-loader.php:213 1
25. gutenberg_get_the_template_html C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\template-canvas.php:12 0
26. include(C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\template-canvas.php) C:\apache\htdocs\wp-a2z\wp-includes\template-loader.php:106 1
27. require_once(C:\apache\htdocs\wp-a2z\wp-includes\template-loader.php) C:\apache\htdocs\wp-a2z\wp-blog-header.php:19 1
28. require(C:\apache\htdocs\wp-a2z\wp-blog-header.php) C:\apache\htdocs\wp-a2z\index.php:17 1

@bobbingwide
Copy link
Owner Author

I don't know where the 64 comes from.

@bobbingwide
Copy link
Owner Author

The 64 is due to an inline filter function in gutenberg_render_core_block_site_logo() which is attached to wp_get_attachment_image_src but not removed if the custom logo for the site is not defined.

This was fixed in WordPress/gutenberg#32229
actually... WordPress/gutenberg#32187

Had I been able to set the site logo this problem would probably not have occurred.

Workaround with the build version of 10.7.1 is to move the following line

remove_filter( 'wp_get_attachment_image_src', $adjust_width_height_filter );

to before the logic that returns early if the $custom_logo is empty.

Now to look at the other styling issues!

@bobbingwide
Copy link
Owner Author

delivered in v0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant