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

Post not loading properly on mobile and desktop - poss AMP issue #2021

Open
linusrees opened this issue Jan 18, 2023 · 9 comments
Open

Post not loading properly on mobile and desktop - poss AMP issue #2021

linusrees opened this issue Jan 18, 2023 · 9 comments

Comments

@linusrees
Copy link

linusrees commented Jan 18, 2023

New posts on my site running Newspack theme Version: 1.65.3 and Newspack plugin Version 1.98.0 has an issue where a new post does not load properly. For example, this post appears to display the CSS code
B5BF0B26-2691-4726-9602-365FC67BF4EC

Three different users of the site have observed this fault. The screenshot here is from own iphone running the Safari browser. At least one other user is using the same. I'm not sure about the others.

Reloading the post does not solve the problem but it seems to load properly after maybe a few minutes or more.

I assume this is a problem with AMP in Newspack and the post is being served from the, er, server incorrectly.

@laurelfulford
Copy link
Contributor

laurelfulford commented Jan 18, 2023

Thanks for reporting this issue, @linusrees!

To me, that looks like JSON, not CSS, and mentions "https://www.w3.org/ns/activitystreams" followed by some Mastondon and PeerTube links, though I'm not sure why it would randomly show up like this. Does that line up with anything you know is running on the site?

This is the first report of this issue, so any additional information you can provide would be a big help for us tracking down the cause! Can you please try:

  • Try turning off AMP temporarily and see if that helps?
  • Disabling any other plugins that are enabled, to help rule them out (you can also post a list here, with their version numbers and I can take a look)
  • Though it's a bit of a long shot, can you share what version of Safari and iOS you're using? That might help reproduce on our end.

In the meantime, I haven't been able to recreate it on your site, but it sounds like it's intermittent, so that doesn't say anything either way -- I can circle back and keep trying.

@linusrees
Copy link
Author

@laurelfulford thanks for your comments. The Mastondon links are part of the "social media menu" on the Newspack Theme, so that is not unexpected.

I am now told by users that the JSON code is also displayed on the Safari browser on a desktop -- ie, not via AMP. Also I have a report on the same error using the Chrome browser on an Apple device (not sure if it was mobile or desktop). Again, all these reports state that the error is temporary and when they refresh the page a few minutes or more later it displays correctly.

@laurelfulford
Copy link
Contributor

Thanks @linusrees!

The Mastondon links are part of the "social media menu" on the Newspack Theme, so that is not unexpected.

The Mastondon URL alone makes sense to me, it's how it's formatted and the rest of it -- I'm not sure what would be loading that JSON to begin with.

I am now told by users that the JSON code is also displayed on the Safari browser on a desktop

Confusingly AMP can run on desktop, too, if the site is set to use AMP in Standard Mode -- that's the default that the Newspack plugin will set a site to if it was used as a setup tool.

Best I can tell the site is running AMP on desktop (if you view source, you can see things like amp-img in the code wrapped around the image tags), but you can verify the setting for sure by navigating to WP Admin > AMP > Settings, and scrolling to "Template Mode".

Did you have a chance to try the other things I suggested (turning off other plugins?). And can you please let me know information (OS and browser version number) of the device you're able to recreate this on?

I'd also be curious what other plugins the site is running, if you could list them here, too -- just to try to narrow down where that code could be coming from!

@linusrees
Copy link
Author

@laurelfulford Thanks for your help with this. I tried to recreate the issue with the page not loading properly just now. It was a post I published more than 18 hours ago and I tried it in the Vivaldi browser (v5.6 on desktop using Ubuntu 20.04.5 LTS GNU/Linux) - it failed to load properly and displayed the JSON code as before.

I checked the AMP settings and they were on "standard" as this was previously the recommended setting when I first installed Newspack. It is flagged as "not recommended". So I switched it to "transitional". This displayed the page as normal. So appeared to fix it. I doubled checked it by clearing the browser cache.

=====================--List of plugins active--================
ActivityPub
Version 0.15.0 | By Matthias Pfefferle | View details

Akismet Anti-Spam
Version 5.0.2 | By Automattic | View details | AMP Compatible

AMP
Version 2.3.0 | By AMP Project Contributors | View details | Get support | Leave review

Co-Authors Plus
Version 3.5.9 | By Mohammad Jangda, Daniel Bachhuber, Automattic | View details

CoBlocks
Version 2.25.5 | By GoDaddy | View details | Leave a Review | AMP Compatible

Crowdsignal Forms
Version 1.6.6 | By Automattic | View details

EmbedPress
Version 3.6.4 | By WPDeveloper | View details

Hypernotes
Version 1.0.1 | By Ella van Durpe | View details

Jetpack
By Automattic | View details | AMP Compatible

Layout Grid
Version 1.8.2 | By Automattic | View details

Newspack
Version 1.98.0 | By Automattic

Newspack Blocks
Version 1.17.1 | By Automattic | Visit plugin site

Newspack Image Credits
Version 1.0.1 | By Automattic, INN Labs, Project Argo

Page Optimize
Version 0.5.2 | By Automattic | View details

ProfilePress
Version 4.5.4 | By ProfilePress Membership Team | View details | Docs | Go Premium

Public Post Preview
Version 2.10.0 | By Dominik Schilling | View details

Site Kit by Google
Version 1.92.0 | By Google | View details | Rate Site Kit | Support | AMP Compatible

WordPress.com Editing Toolkit
Version 3.53419 | By Automattic | View details

Yoast SEO
Version 19.14 | By Team Yoast | View details | AMP Compatible
=====================--end plugins--=================

@linusrees
Copy link
Author

I spoke too soon. There is still an intermittent problem with the page not loading. However, the page did load correctly after a few minutes when I reloaded (refreshed) the page using Vivaldi browser (v5.6 on desktop using Ubuntu 20.04.5 LTS GNU/Linux).
2023-01-20 10 54 15 fitzrovianews com b5d41da19adf

@yogeshbeniwal
Copy link

JSON is generated by ActivityPub plugin, suggest to look for other plugin conflict with it.

@linusrees
Copy link
Author

@yogeshbeniwal

JSON is generated by ActivityPub plugin, suggest to look for other plugin conflict with it.

Thanks. I'll try to check it out. It is very difficult to work through this problem as it is only intermittent. If it would stay broken for long enough for me to fiddle with it, it would help. Most of the time it works fine and loads correctly. I may disable the ActivityPub plugin as I am also sharing the posts via mastodon (manually). But this problem is just irritating rather than critical. But maybe posting it here others may benefit from the comments.

@linusrees
Copy link
Author

The problem came back. So I deactivating ActivityPub -- it didn't fix it. I deactivated AMP -- it did appear to fix it. But when I double-checked it was fine with AMP activated. Most of the posts load fine most of the time. So I'm going to live with it. 👍

@linusrees linusrees changed the title Post not loading properly on mobile - poss AMP issue Post not loading properly on mobile and desktop - poss AMP issue Jan 20, 2023
@linusrees
Copy link
Author

One thing that appeared to clear the problem was updating the post. I didn't actually add anything to the post, I just click update so the date stamp changed. That fix could have just been coincidence, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants