Backoffice has the correct translations, but functions don’t
-
Hi, and thanks for the effort ??
I have a list of pages translated in three different languages. On the back-office, they all seem to be properly translated and the list of pages shows and links them properly.
But on the front-end dropdown menu, they don’t show the same behaviour. Many don’t show an available translation. I have tested it with different functions, and indeed they don’t seem to be properly linked.
Like, the back-office is showing and linking the three translations, but the array created with
pll_get_post_translations( $post_id );
won’t show them. In some cases, not even the actual page.What could be wrong?
This is my setup:
wp-core version: 6.2.2
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: local
user_count: 1
dotorg_communication: true wp-paths-sizes wordpress_path: D:\Repos\copons-fortuny\public\wordpress
wordpress_size: 50.24 MB (52684181 bytes)
uploads_path: D:\Repos\copons-fortuny\public/uploads
uploads_size: 3.47 MB (3635229 bytes)
themes_path: D:\Repos\copons-fortuny\public/themes
themes_size: 1.38 MB (1452225 bytes)
plugins_path: D:\Repos\copons-fortuny\public/plugins
plugins_size: 51.89 MB (54407824 bytes)
database_size: 1.20 MB (1261568 bytes)
total_size: 108.19 MB (113441027 bytes) wp-active-theme name: Copons & Fortuny (coponsfortuny)
version: 1.0.0
author: Marc Campreciós
author_website: https://gitlab.com/mcamprecios/
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, title-tag, menus
theme_path: D:\Repos\copons-fortuny\public/themes/coponsfortuny
auto_update: Disabled wp-mu-plugins (1) Must Use Plugins: version: 1.0.0, author: Roots wp-plugins-active (9) Advanced Custom Fields PRO: version: 6.1.7, author: WP Engine, Auto-updates enabled
Contact Form 7: version: 5.7.7, author: Takayuki Miyoshi, Auto-updates enabled
Copons Fortuny Contents: version: 1.0.0, author: Marc Campreciós, Auto-updates enabled
Duplicate Page: version: 4.5.2, author: mndpsingh287, Auto-updates enabled
Duplicator: version: 1.5.5, author: Duplicator, Auto-updates enabled
Flamingo: version: 2.4, author: Takayuki Miyoshi, Auto-updates enabled
Polylang: version: 3.4.3, author: WP SYNTEX, Auto-updates disabled
UpdraftPlus - Backup/Restore: version: 1.23.7, author: UpdraftPlus.Com, DavidAnderson, Auto-updates enabled
WP Rollback: version: 1.7.3, author: GiveWP.com, Auto-updates enabled wp-media image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 2G
upload_max_filesize: 2G
max_effective_size: 2 GB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: not available wp-server server_architecture: Windows NT 10.0 AMD64
httpd_software: Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
php_version: 8.1.10 64bit
php_sapi: apache2handler
max_input_variables: 1000
time_limit: 36000
memory_limit: 512M
max_input_time: 60
upload_max_filesize: 2G
php_post_max_size: 2G
curl_version: 7.77.0 OpenSSL/1.1.1q
suhosin: false
imagick_availability: false
pretty_permalinks: true wp-database extension: mysqli
server_version: 8.0.30
client_version: mysqlnd 8.1.10
max_allowed_packet: 536870912
max_connections: 151 wp-constants WP_HOME: https://copons-fortuny.test
WP_SITEURL: https://copons-fortuny.test/wordpress
WP_CONTENT_DIR: D:\Repos\copons-fortuny\public
WP_PLUGIN_DIR: D:\Repos\copons-fortuny\public/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: true
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: local
DB_CHARSET: utf8mb4
DB_COLLATE: utf8mb4_unicode_ci wp-filesystem wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable pll_options browser: 0: Detect browser language deactivated
rewrite: 1: Remove /language/ in pretty permalinks
hide_default: 0: Display URL language information for default language
force_lang: 1: The language is set from the directory name in pretty permalinks
redirect_lang: 1: The front page URL contains the language code instead of the page name or page id
media_support: 0: The media are not translated
sync: 0: Synchronization disabled
post_types: post, page, wp_block, coponsfortuny_event
taxonomies: category, post_tag
version: 3.4.3
default_lang: en
main: en => 2 | ca => 15 | es => 16
footer_legal: en => 25 | ca => 26 | es => 27 pll_language_en name: English
slug: en
term_group: 0
term_id: 3
locale: en_GB
is_rtl: 0
w3c: en-GB
facebook: en_GB
home_url: https://copons-fortuny.test/en/
search_url: https://copons-fortuny.test/en/
page_on_front: 59
page_for_posts: 0
flag_code: gb
flag_url: https://copons-fortuny.test/plugins/polylang/flags/gb.png
custom_flag_url: 0
active: true
fallbacks: 0
is_default: true
term_props:
language/term_id: 3
language/term_taxonomy_id: 3
language/count: 23
term_language/term_id: 4
term_language/term_taxonomy_id: 4
term_language/count: 1 pll_language_ca name: Català
slug: ca
term_group: 0
term_id: 6
locale: ca
is_rtl: 0
w3c: ca
facebook: ca_ES
home_url: https://copons-fortuny.test/ca/
search_url: https://copons-fortuny.test/ca/
page_on_front: 145
page_for_posts: 0
flag_code: catalonia
flag_url: https://copons-fortuny.test/plugins/polylang/flags/catalonia.png
custom_flag_url: 0
active: true
fallbacks: 0
is_default: 0
term_props:
language/term_id: 6
language/term_taxonomy_id: 6
language/count: 9
term_language/term_id: 7
term_language/term_taxonomy_id: 7
term_language/count: 1 pll_language_es name: Espa?ol
slug: es
term_group: 0
term_id: 10
locale: es_ES
is_rtl: 0
w3c: es-ES
facebook: es_ES
home_url: https://copons-fortuny.test/es/
search_url: https://copons-fortuny.test/es/
page_on_front: 146
page_for_posts: 0
flag_code: es
flag_url: https://copons-fortuny.test/plugins/polylang/flags/es.png
custom_flag_url: 0
active: true
fallbacks: 0
is_default: 0
term_props:
language/term_id: 10
language/term_taxonomy_id: 10
language/count: 8
term_language/term_id: 11
term_language/term_taxonomy_id: 11
term_language/count: 1The page I need help with: [log in to see the link]
- The topic ‘Backoffice has the correct translations, but functions don’t’ is closed to new replies.