Hi,
I have a page, https://www.bobbie.de/deal_slv_test , that sometimes is messed up by mod pagespeed.
Not sure what is really going on, I see two issues:
A.) Some images get added to the the body, which shouldn't happen (breaks visual and I can't see why they should be there):
See all those img tags directly below <body>, you see one image hovering over the content "SIE SIND ALS...".
B.) The algolia code on the page is runnig into an error:
Uncaught TypeError: Cannot read property 'length' of undefined
at Object.e.scan (algoliaBundle.min.js:1)
at Object.e.compile (algoliaBundle.min.js:1)
at HTMLDocument.eval (eval at <anonymous> (deal_slv_test:1), <anonymous>:1:245)
at c (algoliaBundle.min.js:1)
at Object.fireWith [as resolveWith] (algoliaBundle.min.js:1)
at Function.ready (algoliaBundle.min.js:1)
at HTMLDocument.l (algoliaBundle.min.js:1)
When I disable mod_pagespeed, this works just fine. Also when reloading the page, it sometimes works ok.
I haven't spotted that effect on other pages of the website, so I guess it is something special to this one. Can't see what that should be, though.
Any Idea how to debug that? Can I breakpoint in chrome to see which code is adding those img?
Regards
Alex
--
bobbie Deutschland GmbH
Kasinostraße 44 52066 Aachen
Geschäftsführer
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/3047718.b6tAokP5S5%40alex14.bobbie.de.
Hi Joshua,
# core filters
pagespeed EnableFilters add_head;
pagespeed EnableFilters remove_quotes;
pagespeed EnableFilters combine_css;
pagespeed EnableFilters combine_javascript; pagespeed EnableFilters rewrite_images;
# extra
pagespeed EnableFilters sprite_images;
pagespeed EnableFilters collapse_whitespace;
pagespeed EnableFilters dedup_inlined_images;
pagespeed EnableFilters inline_preview_images,resize_mobile_images;
pagespeed EnableFilters lazyload_images;
pagespeed EnableFilters rewrite_javascript;
pagespeed EnableFilters responsive_images,resize_images;
# CSS Minification
pagespeed EnableFilters rewrite_css,flatten_css_imports,inline_import_to_link,inline_css,move_css_above_scripts,move_css_to_head,outline_css,prioritize_critical
_css,inline_google_font_css;
pagespeed EnableFilters rewrite_images,recompress_images,dedup_inlined_images; # Convert images
pagespeed EnableFilters convert_png_to_jpeg,convert_jpeg_to_webp,convert_to_webp_animated,recompress_webp; # Recompress
pagespeed EnableFilters recompress_jpeg,recompress_png,recompress_webp; # Strip Image
pagespeed EnableFilters strip_image_color_profile,strip_image_meta_data,jpeg_subsampling; # Resize Images
pagespeed ImageRecompressionQuality 80;
pagespeed JpegRecompressionQualityForSmallScreens 70;
pagespeed ImageLimitOptimizedPercent 99;
pagespeed ImageLimitResizeAreaPercent 95;
# Cache
pagespeed EnableFilters insert_dns_prefetch;
pagespeed EnableFilters extend_cache,extend_cache_css,extend_cache_images,extend_cache_scripts,extend_cache_pdfs;
pagespeed EnableFilters local_storage_cache;
pagespeed UrlValuedAttribute img data-zoom-image image;
pagespeed UrlValuedAttribute img data-lazy image;
pagespeed FetchHttps enable;
regards
Alex
--
bobbie Deutschland GmbH
Kasinostraße 44 52066 Aachen
Geschäftsführer
Am Donnerstag, 18. Februar 2021, 13:59:49 CET schrieb 'Joshua Marantz' via mod-pagespeed-discuss:
> Which filters do you have enabled?
>
> On Thu, Feb 18, 2021, 6:14 AM 'Alexander Gran' via mod-pagespeed-discuss <
>
> mod-pagesp...@googlegroups.com> wrote:
> > Hi,
> >
> > I have a page, https://www.bobbie.de/deal_slv_test , that sometimes is
> > messed up by mod pagespeed.
> >
> > Not sure what is really going on, I see two issues:
> >
> > A.) Some images get added to the the body, which shouldn't happen (breaks
> > visual and I can't see why they should be there):
> >
> >
> >
> > See all those img tags directly below <body>, you see one image hovering
> > ------------------------------
> >
> > bobbie Deutschland GmbH Wilhelm-Dieß-Weg 2 81927 München
> > Büro München: Leopoldstraße 7 80802 München Eingang Georgenstraße
> > Büro Aachen: Kasinostraße 44 52066 Aachen
> > ------------------------------
> > Geschäftsführer: Tim Kuhlmann; Dipl.-Inform. Alexander Gran MBA;
> > Dipl.-Ing. Stephan Langkau MBA
> >
> > Amtsgericht München HRB 233452 Ust.-ID-Nr. DE311909262
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "mod-pagespeed-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to mod-pagespeed-di...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/mod-pagespeed-discuss/3047718.b6tAokP5S5
> > %40alex14.bobbie.de
> > <https://groups.google.com/d/msgid/mod-pagespeed-discuss/3047718.b6tAokP5
> > S5%40alex14.bobbie.de?utm_medium=email&utm_source=footer> .
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/17735556.zbQaehjsQW%40alex14.bobbie.de.
Hi Joshua,
Thanks. I've tried that, but it didn't help.
However while tracking down the bug, I came closer to something:
My page loads various stuff via requirejs. One of the things loaded are hogan templates for aloglia search. It is loaded by https://www.bobbie.de/static/version1613755810/frontend/Bobbie/Theme/de_DE/Bobbie_CustomAlgolia/js/search.js
(version number may vary)
on the very top, and appended to the body, creatig some <script "text/template"> entries.
All good so far, algolia will load those later.
Now pagespeed image inliner starts to wipe them out again:
And replaceLastScript then:
Not sure where the assumption comes from that you could swap out the last script of the document? In my case thats one of my templates, but could be anything I think.
Using -inline_images,-delay_images,-lazyload_images,-local_storage_cache seems to fix the issue.
Regards
Alex
--
bobbie Deutschland GmbH
Kasinostraße 44 52066 Aachen
Geschäftsführer
> > > > T: +49 89 2154015-11 <+49%2089%20215401511>
> > > >
> > > >
> > > >
> > > > M: +49 1755830772 <+49%20175%205830772>
> > https://groups.google.com/d/msgid/mod-pagespeed-discuss/17735556.zbQaehjsQ
> > W%40alex14.bobbie.de
> > <https://groups.google.com/d/msgid/mod-pagespeed-discuss/17735556.zbQaehj
> > sQW%40alex14.bobbie.de?utm_medium=email&utm_source=footer> .