• Resolved offisapup

    (@offisapup)


    I have a curious problem …

    I have a number of sites behind a reverse proxy, some standalone, one multisite.

    They are all running the latest version of WP (5.8.3), on PHP 7.3.20 and httpd 2.4.23.

    In the standalone sites, when editing a page or post, the Editor comes up in Code mode, and the menu item for switching to Visual mode is not there. Using the shortcut (Ctr-Shift-Alt-H) does not work. When opened in an incognito window (no cookies …), it runs through the welcome-to-the-block-editor sequence.

    In the multisites it works …

    I’ve set up a clean standalone site — no extra plugins, no extra themes — same problem. The Health-Check plugin shows nothing unexpected.
    I’ve rolled back the WP version to 5.8.2, 5.8.1 — same problem.
    I have not disabled the visual editor in the profile.

    The fact that it works in the multisite, but not in any of the standalone sites may suggest a problem in the .htaccess file that splits the traffic, but it has worked before.

    Ideas? Troubleshooting tips?

    mvh /offisapup

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter offisapup

    (@offisapup)

    It’s httpd 2.4.37 …

    Thread Starter offisapup

    (@offisapup)

    … no 400’s on loading the javascript packages …
    browser is Version 96.0.4664.110 (Official Build) (64-bit), but since the multisite works in the same browser, this should not be the issue?

    Thread Starter offisapup

    (@offisapup)

    OK, tested some more and

    1. It’s the same in a clean profile — so it’s not corruption in my profile
    2. It’s the same in Chrome (with a clean profile) and Firefox (with a clean profile) — so it’s not a javascript issue (?)

    Thread Starter offisapup

    (@offisapup)

    … and furthermore — it doe not show the “Editing code” label at top left, nor the “Exit code editor” link.

    Something in the setup/delivery of the site makes the editor javascript code decide there’s no support for blocks? What?

    Thread Starter offisapup

    (@offisapup)

    OK — solved it!

    All the sites (single installations, as well as the multisite) share the same user table — they need to share the usermeta table, too. Otherwise the code that selects the editor can’t pick up the ‘rich_editing’ user option, that is apparently set on creation of users.

    So: do not set ‘CUSTOM_USER_TABLE’ without setting ‘CUSTOM_USER_META_TABLE’ at the same time.

    Thanks for sharing your troubleshooting journey! Based on the symptoms, I believe I have the same issue as you. However, I’m unsure of 1) how to implement your solution, and 2) why this is an issue in the first place.

    Can you share at least high-level instructions? I appreciate it!

    Thread Starter offisapup

    (@offisapup)

    If you sharing users between WP installs, you need to share both the user table *and* the user_meta table.

    I have (now)

    /* local mods */
    /* use a common users table */
    define( 'CUSTOM_USER_TABLE', 'wp_users' );
    define( 'CUSTOM_USER_META_TABLE', 'wp_usermeta' );
    

    in all WP installs … and I had to do some fairly complicated merging of the old, site-specific, user_meta tables.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stuck in Code Editor — no menu to change’ is closed to new replies.