Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#7675 closed defect (bug) (fixed)

Lang guess: Support

Reported by: renyot's profile renyot Owned by: renyot's profile renyot
Milestone: Priority: normal
Component: Site Keywords: has-patch


Currently lang guess doesn't handle the request from, making it not able to render a language guess banner on learn sites.

Attachments (1)

2428.patch (3.4 KB) - added by renyot 4 weeks ago.

Download all attachments as: .zip

Change History (8)

4 weeks ago

#1 @renyot
4 weeks ago

  • Keywords has-patch added
  • Owner set to renyot

This ticket was mentioned in PR #626 on WordPress/wporg-mu-plugins by @renyot.

4 weeks ago


The locale information for Learn comes from the query parameter locale rather than the subdomain, so this PR retrieves the locale and sends it to lang-guess for processing.

lang-guess corresponding tweaks:

#4 @Otto42
4 weeks ago

Nice patch. Does the banner show up properly?

#5 @renyot
4 weeks ago

Thanks. Yes, there are some screenshots in this PR

#6 @renyot
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed


Lang guess: Support

See ​

@ryelle commented on PR #626:

4 weeks ago

It looks like this triggers a notice now, I'm seeing this on my local env:

Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the language-suggest-front handle. Please see Debugging in WordPress for more information.

Note: See TracTickets for help on using tickets.