Open Nic-Sevic opened 9 months ago
📌 REPRODUCTION RESULTS
– Tested on Atomic : Replicated
📌 FINDINGS
Here is my website before the revert:
https://github.com/Automattic/wp-calypso/assets/2540430/3c0c8510-39c2-48e3-b4c8-8ca9873377f3
And after the revert:
https://github.com/Automattic/wp-calypso/assets/2540430/83266699-fda9-420e-a48c-802cf8de0c8b
Notice how all the images added to the Homepage template are fine? Even my header is no longer sticky.
Missing images are using the wpcomstaging domain uploads folder URL:
📌 ACTIONS – Replicated.
📌 Message to Author
@Nic-Sevic Thanks for the report.
Do you think we should update P9HQHe-1sw-p2 and ask HEs to spot-check sites after reverts and look for these situations where the template element settings are also lost?
@filipanoscampos It's already mentioned in that guide that theme settings are not imported, which in my mind would include templates. This bug seems to be more associated with the link replacer not understanding how to correctly replace things in templates so I can add a link to this issue in the broken images section
@Automattic/reactor, do you know if this issue is being worked on by the Atomic Team in any regard?
It was tried in Jan and wasn't allocated or prioritised after that. We are group triaging the board and feel there may be related work recently finished/in-flight.
@inaikem, I couldn't find anything on Atomic P2, and this doesn't seem like Atomic team territory, so they're probably not working on. When a lossless revert happens we just export an XML and import it into a site, so this seems more like the core XML importer territory, and as Nic mentioned specifically handling the URL updates within FSE templates after an XML import.
I put this on my list of things to test next week to see if I'm understanding what's happening and expected. Also, to see if the same thing happened with imports from self-hosted, or if it's isolated to lossless reverts, WordPress.com, or reproducible in core.
Quick summary
User case came up where only the media links in a site editor template were not changed correctly following a lossless import after atomic revert: p1704902458034259-slack-C03TY6J1A
In this case all other media links were changed as expected but images in the home template were reassigned to the original atomic location. Additionally, the template navigation block was not updated correctly
I then attempted to replicate this to see what was changed but got inconsistent results using my test sites
Test 1 (site was atomic for a while): aacm2345blog.wordpress.com
test 2 (site newly created, transferred, reverted): reverttesting1million.wordpress.com
Steps to reproduce
What you expected to happen
I expect to see all paths in the exported xml as atomic-temporary links which then get updated to the current simple address and file structure after import (ie atomic-temporary-{blogid}wpcomstaging.com -> site.files.wordpress.com)
What actually happened
In the user site media links in the home template (which was applied to the home page) were still reflecting the atomic structure (site.com/wp-content/uploads/...) In my test site the theme was not updated according to the changes made while atomic and none of the media links were updated correctly; all reflected the atomic structure
export file of test site 1: https://atomic-temporary-177677591.wpcomstaging.com/177677591.wordpress.000.xml site itself: aacm2345blog.wordpress.com
In one instance the theme of the site wasn't brought over (although it is in the import file) and media links throughout the posts (regardless of how they were added) were assigned to point at the original atomic location
Impact
Some (< 50%)
Available workarounds?
Yes, difficult to implement
Platform (Simple and/or Atomic)
No response
Logs or notes
No response