Wp-calypso: Page Layouts and Auto Loading Homepage not working for certain languages

Created on 30 Jan 2020  路  11Comments  路  Source: Automattic/wp-calypso

Steps to reproduce

  1. Set account language to Dansk, French, or Portuguese (not an exhaustive list)
  2. Set theme to a template first theme (i.e. Balasana)
  3. Observe home page layout
  4. Create a new page
  5. Switch to another template first theme (i.e. Rockfield)
  6. View home page layout

What I expected

  1. Switching to a template first theme should auto load the home page content for that theme demo as a home page
  2. When creating a new page, the page layout selector should appear
  3. When switching from one template first theme, the previous home page should be moved to a draft and a new home page should be created with the demo content for that theme

What happened instead

  1. Theme home page content matching the style of the theme demo was not created
  2. The page layout selector was not present when creating a new page
  3. Switching from one theme to another did not change the home page content

Context / Source

In limited testing, page layouts and auto loading homepage worked for these languages:
English
Spanish
Italian
Dutch

Did not work for these languages:
Dansk
French
Portuguese
Hindi
Gujarati

user-report

2669525-zen

[Goal] Page Templates [Type] Bug i18n

Most helpful comment

Fixed in D38624-code

All 11 comments

Thanks for the super detailed bug report! This is the same issue as https://github.com/Automattic/wp-calypso/issues/38889 so I'll close this one.

This happens for sites that have a non-English language set up (because headstart translations are missing). More discussion and details here p1579253842001100-slack-onboarding-exp

In the meanwhile users who experience the above can switch their site to English language in WordPress.com > My Sites > Manage > Settings > Language, then pick the layout they want (as all of them should become available) and finally switch back to their preferred language again.

@zdenys I'm not certain if it's the exact same thing, though it looks likely to be closely related.
In @philnick206's report he mentions that

The page layout selector was not present when creating a new page
whereas in https://github.com/Automattic/wp-calypso/issues/38889 the page layout selector does appear, just doesn't display all the page layouts.
In the case @philnick206 is reporting, the page layout selector didn't appear at all - instead the user was brought straight into Gutenberg. The "page layout" option didn't appear in the Document sidebar, even.

While the two issues look closely related, I think they are different enough to keep both issues open.

Thanks for pointing this out @thehenrybyrd . You are right here, it's closely related but not exactly the same issue. The root cause is most likely the missing headstart translations for non-English languages. I'm reopening it so the responsible team can look into this. I also commented about this here p1580391475034800-slack-onboarding-exp

Homepage template on theme switch

If there is not a translation for the requested locale, we don't replace the homepage on theme switch. The assumption is that most users would find it rather disruptive to have the front of their localized site to be switched to an English homepage. So I wouldn't necessarily consider this a bug.

@apeatling I'll defer to you on whether we should change that or not.

Template selector not loading

It looks like the fallback to English either doesn't work or hasn't been implemented yet.
I'll take a look at that

Template selector not loading

This bug was fixed in D38596-code.

D38596-code had to be reverted. New diff in D38624-code

Fixed in D38624-code

Just to clarify, it is expected behavior that if the user has a non-English language site they will not see all the available templates?

I just had a Quick Start session 2745049-zen where the site language was French and we were not able to see most of the templates, as in https://github.com/Automattic/wp-calypso/issues/38889.

So when activating Stratford Theme, we got the warning introduced in https://github.com/Automattic/wp-calypso/issues/39073 but it didn't apply the template to the homepage. this is not the ideal expected behavior I'd argue.

Will this be fixed once the localization of all templates is complete, @obenland?

Yes that is expected if it's a Mag16 language, where we have a translation file but that is outdated. Which is true for all of them after the new templates were introduced.

I have an odd case in 2760453-zen with a site using Rockfield Theme. The user had the Swedish language selected both for the account and for the site. Switching both languages to English still didn't trigger the full list of templates and I only could see 5 of them for the home pages:


_Link: https://d.pr/i/HZ4eao_

I can file a new bug report if needed but I will reopen this one for now as it seems related. Also, should https://github.com/Automattic/wp-calypso/issues/38889 (mentioned earlier above) be considered the same issue?

The missing translations are being tracked in #37782.

The fallback for non-mag16 language is working and fixes this ticket.

Was this page helpful?
0 / 5 - 0 ratings