Remember the entry form layout for old posting and editing links (#3994)
- Remember the entry form layout for old posting and editing links
Old /update and /editjournal links, the Edit Entries page and stale-tab
recovery links opened the simple layout for everyone, including people
who had opted into the native editor through the updatepage beta. The
layout switch link now stores the chosen layout in a new
entryform_layout userprop, and those links open the stored layout
(simple by default).
bin/upgrading/migrate-updatepage-beta.pl gives updatepage beta users
the advanced layout. Run it before removing updatepage from
%LJ::BETA_FEATURES: checking any beta drops inactive keys from a
user's beta list.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- Fix review findings in the entry layout preference
Store an explicit "simple" choice even while the preference is unset,
so the beta migration can't override it; report a failed save instead
of claiming success; reject values with a trailing newline. The switch
link saves before following itself when the browser won't queue a
beacon.
The migration skips accounts that no longer exist, reads from the
cluster master and re-reads each preference before writing, reports
failures in its exit status, and takes --userid to limit a run (the
test uses it so it leaves other development accounts alone).
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- Give updatepage beta users the advanced layout before migration
With no stored layout, fall back to the updatepage beta: people who
opted into the native editor get its advanced layout from old links
right after deploy, not only once the migration script has run. A
stored choice still wins.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
- Read the updatepage beta list without rewriting it
The layout fallback called is_in_beta, which rewrites the whole beta
list when any beta has expired; on every old link that could race with
joining another beta, and expiring updatepage would erase what the
migration needs. Read the list directly instead.
The migration re-checks each stored layout on the cluster master
rather than memcache. A modified click on the layout switch still opens
its new tab when the browser refuses the beacon.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com