Automattic / jetpack

Security, performance, marketing, and design tools β€” Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.

Home Page:https://jetpack.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Map Block: Markers no longer visible in editor

mdawaffe opened this issue Β· comments

Impacted plugin

Jetpack

Quick summary

Mapbox markers no longer show up in the editor as of Gutenberg 18.5.0. The markers are still visible on the front end.

The relevant change is: WordPress/gutenberg#61943 - Enabling React's strict mode (though I don't know why that caused the issue).

Steps to reproduce

  1. Create a new post
  2. Add a map block (ensure you have a Mapbox access token set) and add a marker.
  3. See that the marker does not appear.
  4. Publish the post, and view it on the site.
  5. See that the marker does appear.

A clear and concise description of what you expected to happen.

Map markers should be visible in both the front end and the editor.

What actually happened

Markers are not visible in the editor.

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

πŸ“Œ REPRODUCTION RESULTS

  • Tested on Simple – Could Not Replicate
  • Tested on Atomic – Replicated / Could Not Replicate / Uncertain
  • Tested on P2 (optional) – Replicated / Could Not Replicate / Uncertain
  • Replicable outside of Dotcom – Yes/No

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO
WordPress.com Simple - markers show correctly on backend and frontend
CleanShot 2024-06-17 at 11 34 42@2x

WordPress.com Atomic

CleanShot.2024-06-17.at.11.43.36.mp4

πŸ“Œ ACTIONS

  • Triaged
  • Requested author feedback

πŸ“Œ Message to Author
@mdawaffe I wasn't able to reproduce it, markers show for me in both Atomic and Simple. Am I missing anything?

I wasn't able to reproduce it, markers show for me in both Atomic and Simple. Am I missing anything?

Atomic and Simple use a different map provider, Mapkit, instead of the default Mapbox. The problem seems limited to Mapbox for now.

I've been unable to replicate this with Jetpack self-hosted either, both locally and using Jurassic Ninja test sites.
I've tested with the current Jetpack stable version, and trunk. I've tested with and without the Gutenberg plugin active at version 18.5.0. I've tested both with a 5yo Mapbox token and a brand new one. Also in Chrome, Firefox and Safari.

@jeherve were you able to replicate?

I can reproduce with Gutenberg trunk:

https://cloudup.com/cr9vR5X4F1d

Reverting WordPress/gutenberg#61943 doesn't help me fix it though.

Very odd. I'll look again today at what's going wrong. Thank you for looking, everyone.

Mapbox markers no longer show up in the editor as of Gutenberg 18.5.0

This was wrong - sorry for the wild goose chase. I misunderstood Gutenberg's release process. Strict Mode was not enabled in 18.5.0, though it is in trunk. I believe it's slated to be part of Gutenberg 18.6.0.

I still think it's Strict Mode that's causing this problem, though I don't know why: it shouldn't have any effect on production builds.

@jeherve, how were you testing the Strict Mode revert? For me:

  1. Testing on the released 18.5.0 version: I cannot reproduce the bug.
  2. Testing on trunk: I can reproduce the bug.
  3. Testing on trunk but applying this patch: I cannot reproduce the bug.

That patch was generated with git revert 736121fac2977be98db294fe51421d96c8526993 and then cleaning up the conflict caused by 9ecf72195f4ce992c3b428407b1b793b1acaf6bc.

I have a patch up at #37918