The two or three first template Revisions are unavailable (works fine after that)
Quick summary
I don't see the template revisions in the Site Editor for the Archive and 404 templates.
Steps to reproduce
- Start in the Site Editor
- Edit the
404template to customize it. - Check for revisions on the right sidebar of the template, to revert to the default
404template.
What you expected to happen
Revisions should be available as they are part of Gutenberg 15.2
What actually happened
No link to access template revisions.
Here are my testing videos showing I customized Archive and 404 templates in the Heiwa theme, but once you open the Site Editor and go in to the template editor, the revisions are unavailable.
https://user-images.githubusercontent.com/1519466/226509974-28755233-ba79-4439-99fb-18f0ae2123f8.mp4
https://user-images.githubusercontent.com/1519466/226509939-4e4c9c2f-aa55-45cb-b7ef-12735fed3947.mp4
Impact
One
Available workarounds?
No and the platform is unusable
Platform (Simple and/or Atomic)
Simple, Atomic
Logs or notes
No response
I've triaged this and confirmed it happens on WPCOM Simple and Atomic sites - but not on a fresh Self Hosted Wordpress installation with GB 15.3 active.
I was playing around with template revisions yesterday and the revisions screen itself is currently pretty broken.
There's a GB issue open to fix it and an equivalent core bug marked as blocking WP 6.3.
There is a PR open with a core fix. Maybe we want get that in dotcom before deploying the fix for this (though we can still look into the bug and prepare a PR).
Dunno where you are with this @BogdanUngureanu but I came across the original PR when looking for the above and it says:
- When merging into core, prepare_revision_links() should be merged with
- WP_REST_Templates_Controller::prepare_links().
Might be a good thing to check!
I was playing around with template revisions yesterday and the revisions screen itself is currently pretty broken.
There's a GB issue open to fix it and an equivalent core bug marked as blocking WP 6.3.
There is a PR open with a core fix. Maybe we want get that in dotcom before deploying the fix for this (though we can still look into the bug and prepare a PR).
Dunno where you are with this @BogdanUngureanu but I came across the original PR when looking for the above and it says:
- When merging into core, prepare_revision_links() should be merged with
- WP_REST_Templates_Controller::prepare_links().
Might be a good thing to check!
Thanks for the links! I think those issues are related to the revision page, not why the revision links are not showing in the sidebar.
I've made a few tests and it looks like on Atomic is working(ish); the revision link appears when the user makes two distinct changes on the page, which was an unexpected behavior (at least for me); meanwhile on Simple, I wasn't able to make the links appear at all.
I haven't done an in-depth technical review about why it's not working on Simple, but I think we should continue with that; maybe it's a core issue for multisites.
I think those issues are related to the revision page, not why the revision links are not showing in the sidebar.
Yep 100%, just trying to point out that the revision page is pretty broken for templates so I don't think we should ship a link to the revisions page until the revisions page is fixed.
Maybe it's a multi-site issue. Maybe it's an issue from how we sync code from core to wpcom (as the comment I quoted says there's some sync stuff from gb to core), maybe it's something completely different. IDK but I'm sure you'll soon find out!
Looks like the problem in WPCOM is because the wrong template controller is loaded. I've opened a diff that fixes the problem by adding an additional guard. D106565-code
@BogdanUngureanu has found the problem and a fix, but the link doesn't work in the iframed editor. Given this is hopefully being removed soon we'll hold any further work (p58i-eb7-p2#comment-57590).
The iframed editor removal happened yesterday, so this is probably not blocked anymore.
The revisions screen itself is still (in my opinion) pretty broke once you can reach it 🤔
Agreed - until it's actually possible to use the revisions screen without it being broken it seems lower priority to make it available. But it would be good to be ready to make it available as soon as it is working...
Let's keep the fix on hold for now until the feature is stable in Core.
The feature has been fixed in a GB backport, so we can take this off-hold once GB15.9 is on dotcom
While template revisions were appearing for "Page" template on other block themes, seeing no revisions on "Yuga" theme.
Deployed the fix on production with rWPGITf712d86b59216c3bb84abf228829c6ed59048891 with D106565-code
Couldn't find the revisions of the templates again https://github.com/Automattic/wp-calypso/assets/11535091/8427583c-fb8a-4aff-a5c9-4723e7065a0a | Cakely theme | Simple site
8190436-zd-a8c
Support References
This comment is automatically generated. Please do not edit it.
- [ ] p58i-eb7-p2#comment-57590
- [ ] 8190436-zen
- [ ] 8827733-zen
@Automattic/t-rex, it looks like we have a regression here. I have added this to T-Rex's board (backlog column).
Could you take a look? Thank you!
CC: @BogdanUngureanu since you closed this last time. Thank you!
Did we have a situation where you have to have so many revisions before revisions appear at all? We were able to see revisions on this user's site again. 8190436-zd-a8c
Hey @daria2303, @mrfoxtalbot. I did some tests on Simple and a Jurassic site yesterday and noticed that the revisions still appear only after making 2-3 distinct changes.
I think it's a core issue.
You are absolutely right @BogdanUngureanu, it is coming from core: https://github.com/WordPress/gutenberg/issues/49164
I am labeling this accordingly and adding it to the Cross-Repo watchlist.
Adjusting priority to Normal as per this comment: p1721286471977819/1720683311.692079-slack-C01UW7SB411
Another report with confusion on this 8827733-zd-a8c
Removing from the T-Rex backlog, the initial issue we fixed is very different to the current framing of the issue.