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

Themes: React tree reconciliation error in logged-in multi-site view #2299

Closed
ockham opened this issue Jan 12, 2016 · 4 comments
Closed

Themes: React tree reconciliation error in logged-in multi-site view #2299

ockham opened this issue Jan 12, 2016 · 4 comments
Labels
[Feature Group] Appearance & Themes Features related to the appearance of sites. Server Side Rendering [Type] Bug When a feature is broken and / or not performing as intended

Comments

@ockham
Copy link
Contributor

ockham commented Jan 12, 2016

Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) <div class="wp layout is-section-fa
(server) <div class="wp is-section-design ha

To reproduce -- enter calypso.localhost:3000/design into your browser (while logged-in, with JS enabled).

@ockham ockham added [Type] Bug When a feature is broken and / or not performing as intended [Feature Group] Appearance & Themes Features related to the appearance of sites. Server Side Rendering labels Jan 12, 2016
@ockham ockham added this to the Themes: Showcase M3-LoggedOut milestone Jan 12, 2016
@ehg
Copy link
Member

ehg commented Jan 12, 2016

This is because the logged in cookie doesn't exist in the development environment. It only exists when wpcom_user_bootstrap is enabled, so I don't think we have an easy way to detect whether someone is logged in on the server side without it(!)

@ehg ehg removed this from the Themes: Showcase M3-LoggedOut milestone Jan 14, 2016
@ockham
Copy link
Contributor Author

ockham commented Apr 12, 2016

Update: Reconc errors can have subtle reasons that tend to pile up when remaining unfixed -- some of them with other (graver) implications :-/ AFAICS, there are currently three sources:

  1. client/boot renders to #wpcom, overriding any SSR'd element tree with one that has empty #primary, #secondary, and #tertiary divs. Fix in Framework: Don't render layout for isomorphic sections in client/boot #5115. (This is one of the graver ones -- client/boot overriding stuff, and being called only after isomorphic middlewares on the client side leads e.g. to issues with i18n initialisation)
  2. /design gets class is-section-theme instead of is-section-themes. :rolleyes: See Themes: Move Theme Details sheet to my-sites/theme #4668 for the reason and a fix (WIP).
  3. The has-no-sidebar class is determined by sections.js's secondary field, which is either true, or false. However, /design can be used both when logged-in (with a sidebar), and logged-out (no sidebar). So this scheme is too rigid for our purpose. /cc @mtias

Also /cc @seear @folletto

@lancewillett
Copy link
Contributor

Hi @ockham — following up on this old thread, are there still actionable items left, or can we close it now?

@ockham
Copy link
Contributor Author

ockham commented May 24, 2016

Part of it is still viable -- I filed #5560 to track the current state of affairs for reconciliation errors.

@ockham ockham closed this as completed May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Appearance & Themes Features related to the appearance of sites. Server Side Rendering [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants