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

Replace my homepage content does not work if Default Homepage is not selected #75659

Closed
donalirl opened this issue Apr 13, 2023 · 11 comments
Closed
Labels
[Feature] Headstart Resetting a site to the default content for a theme. [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report

Comments

@donalirl
Copy link

donalirl commented Apr 13, 2023

Quick summary

When activating a theme, choosing "Replace my homepage content with the [theme] homepage" does not show the theme demo's homepage on the site if Settings → Reading → Your homepage displays is not set to default. This headstart feature is important for helping users to succeed in creating their sites.

If a user selects "Replace my homepage content with the [theme] homepage", then Settings → Reading → Your homepage displays should switch back to 'Default'.

image

Steps to reproduce

  1. Go to Settings → Reading
  2. Set your homepage displays to a custom page (not 'default')
  3. Go to Appearance → Themes
  4. Activate a theme such as Stewart, Adventurer, or CTLG
  5. When prompted, choose "Replace my homepage content with the [theme] homepage."
  6. View the site with the new theme active

What you expected to happen

I expected the site's homepage to match the demo.

What actually happened

My old content continued to display on the homepage.

Impact

All

Available workarounds?

No and the platform is unusable

Platform (Simple and/or Atomic)

Simple, Atomic

@donalirl donalirl added [Type] Bug User Report This issue was created following a WordPress customer report labels Apr 13, 2023
@github-actions github-actions bot added [Platform] Atomic [Platform] Simple [Pri] BLOCKER Requires immediate attention. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Apr 13, 2023
@donalirl donalirl changed the title Not working: Replace my homepage content with the theme demo homepage. Replace my homepage content does not work if Default Homepage is not selected Apr 13, 2023
@youbrokesomething youbrokesomething added [Pri] Normal Schedule for the next available opportuinity. and removed [Pri] BLOCKER Requires immediate attention. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Apr 13, 2023
@cuemarie
Copy link

📌 SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated
  • Replicable outside of Dotcom – No

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Replicated just as described - the theme homepage switch is not switching to the default template as expected.

Screenshots/Recordings

ATOMIC TEST Twenty Seventeen -> Stewart

Markup on 2023-04-13 at 13:46:08

STezIz.mp4

SIMPLE TEST Twenty Twenty-Three -> Stewart

mgNQnE.mov

📌 ACTIONS

  • Assigned to Lego

@cuemarie cuemarie added [Feature] Headstart Resetting a site to the default content for a theme. Triaged To be used when issues have been triaged. labels Apr 13, 2023
@obenland
Copy link
Member

@donalirl It looks like Stewart does not have a front page template in its Headstart annotation, even though it has the auto-loading-homepage tag. Adventurer and CTLG don't have annotations either, but they also don't have the tag in their style.css. For some reason they're shown in Calypso as having it, though.

@pbking Could You take a look at updating Stewart's Headstart annotations?
@autumnfjeld Who'd be the best person/team to look at why Calypso shows themes in the auto-loading-homepage filter that don't have the style.css tag?

@autumnfjeld
Copy link
Contributor

autumnfjeld commented May 31, 2023

@obenland & @donalirl & @pbking

I don't think auto-loading-homepage tag has anything to do with this issue, though correct me if there is something I am missing.

Stewart annotations work fine when creating a new site, I do not think the annotations are the problem.

I would describe the root problem as this: For the examples shown above the site starts out with "Your homepage displays" set as a static page (not Default). During theme switch what SHOULD HAPPEN is

I don't know why the theme switch process/headstart isn't respecting the Stewart annotations. Can find out. I do know that this is broken for every theme switch like this:
Theme with static home -> theme with no pages (instead a index.html displays as the root page)

All new dotcom themes are made like this, where the root page content is in index.html.


If we were to really do this right, theme switch would need to change the site's reading settings according to scenario at play (knowing what the current theme/reading settings are, knowing what they need to be for the new theme/site, knowing what the user really wants to do with their content). Team Lego has spent much reseach working on this large problem.
Some reading if you want a deep dive:

  • Auto loading homepage on theme switch issues pbAok1-1Yh-p2 - a P2 from Feb 2021 :(
  • Deprecate Theme Switch modal #73726
  • Thought about improving the Live Preview/Theme Switch experience as a whole: pekYwv-1vZ-p2
  • What are the common use cases of the Theme Switch?: pekYwv-1pj-p2
  • Search for "theme switch" in bxlJb-p2

Addressing this a Marvel goal for the next two or so months.


FYI

image


In Progress & Pending Work

We are about to change the theme switch modal, in part for the exact reason of this issue, it isn't helpful and is broken for block themes.

We are removing these options to choose preserve or not:

image

And then we'll be doing this:
[PT: Live Preview in the Theme Showcase]( pbxlJb-3Uv-p2

Lots of theme preview / theme switch fixes coming up: p58i-evH-p2#comment-58380

We welcome your HE input and advice as we make these improvements @donalirl

cc: @Automattic/lego (please chime in if I missed any details)

@obenland
Copy link
Member

I don't think auto-loading-homepage tag has anything to do with this issue, though correct me if there is something I am missing.

The code that does the homepage loading relies on the the tag to determine if it should swap it or not (See A8C\MU\Full_Site_Editing\Template_First_Themes::update_homepage_template() and ::has_autoloading_homepage()).

Themes that don't have annotations with a front page should not have the auto-loading-homepage tag. There's a separate tag for blog themes, blog-homepage, that correctly sets show_on_front and preps any existing front page to be restored later, if the customer changes back to their old theme. D61673-code has a pretty good summary of how that functionality works.

auto-loading-homepage can also be set as a "Theme Feature"

Let's please remove the tag from themes that shouldn't have it.

@autumnfjeld
Copy link
Contributor

autumnfjeld commented Jun 1, 2023

Thank you for the re-direction and the extra information @obenland. Very helpful! Now I better understand the role of the auto-loading-homepage tag. I suspect that implementing the fixes you suggest above will fix a few different problems we've encountered in theme switch. cc: @okmttdhr

@arthur791004
Copy link
Contributor

arthur791004 commented Jun 1, 2023

Who'd be the best person/team to look at why Calypso shows themes in the auto-loading-homepage filter that don't have the style.css tag?

I guess this is because the Design Picker in the onboarding flow only showed themes with the auto-loading-homepage tag before, so people might add the tag manually, especially for the newly created themes. But now we don't rely on this tag to decide whether it should be shown on the Design Picker. Instead, we're using the full-site-editing tag, so we might need to review the theme with the auto-loading-homepage but their style.css doesn't have it 🤔 CMIIW

@autumnfjeld
Copy link
Contributor

autumnfjeld commented Jun 5, 2023

After fixing this, it might be worth a quick P2 post, x-post to HE, as the fix may have a lot of impact on known issues with theme switch.

@donalirl
Copy link
Author

donalirl commented Jun 7, 2023

@autumnfjeld You've summarized the issue well 👍 I've since recreated the same issue on the Iotix and Loudness themes.

From a HE perspective, a typical user expects that when they activate a theme, they will have access to the same content they see on the demo site. The natural flow is to activate the theme, begin replacing the demo text and images for their own, and publish their customized content to the live site.

@arthur791004
Copy link
Contributor

Proposing D113778-code to configure the “Homepage Displays” setting to “posts” for any block themes as they should use the template as their homepage. Is there any block theme using the static page as the homepage?

@okmttdhr
Copy link
Member

okmttdhr commented Jun 19, 2023

Is there any block theme using the static page as the homepage?

I left a comment in the diff, but some themes have a static page as the homepage, e.g., Appleton, Ames, and Dorna (I think there're more).

we might need to review the theme with the auto-loading-homepage but their style.css doesn't have it

I vote for this!
I think it means that the auto-loading-homepage tag is attached to themes that should not have it, so it seems to be better to review it to reduce the complexity in the future.

(If we have a large number of such themes, we might have to think about it though.)

@fushar
Copy link
Contributor

fushar commented Aug 2, 2023

We have fixed this issue!

@fushar fushar closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Headstart Resetting a site to the default content for a theme. [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report
Projects
None yet
Development

No branches or pull requests

8 participants