This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 8 replies, has 2 voices.

Last updated by Bruno Kos 5 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
May 2, 2019 at 8:25 am #3722681

lars-kroghJ

Hallo their.

Right now when we crawl our .se site, we find our .dk page content.
Now we limited the amount of .dk site content to less then nothing. But we still have a problem, that when you access one of the urls that still are found in the crawl. You get redirected to the default lang site. So your getting redirected to the .dk site and not to the frontpage of the .se site.

So how to fix this. ?

I found this code on your forum. :

add_filter('icl_ls_languages', 'wpml_ls_filter');

function wpml_ls_filter($languages) {
global $sitepress;

$default_url = $languages[$sitepress->get_default_language()]['url'];
foreach($languages as $lang_code => $language){
if($languages[$lang_code]['missing']==1){
$languages[$lang_code]['url'] = $default_url;
}
}
return $languages;
}

But that still keeps sending me to the .dk site when i access a no translated site. And it don't send me to the frontpage of the .se as i need it to.

So if i visit hiddenurl.se/link-is-not-translated i need to be send to hiddenurl.se and not to hiddenurl.dk/link-is-not-translated and get the .dk content shown.

Can you help me with that. ???

Also how come that when we crawl our .se site, with "just" 80 pages translated we find over 600 sites, and not just the 80 sites that are translated. ??

Attachted here is WPML settings :

Array
(
[hide_upgrade_notice] => 4.1.3
[icl_capabilities_verified] => 1
[active_languages] => Array
(
[0] => da
[1] => no
[2] => sv
)

[interview_translators] => 1
[existing_content_language_verified] => 1
[language_negotiation_type] => 2
[theme_localization_type] => 2
[icl_lso_link_empty] => 0
[sync_page_ordering] => 1
[sync_page_parent] => 1
[sync_page_template] => 1
[sync_ping_status] => 1
[sync_comment_status] => 1
[sync_sticky_flag] => 1
[sync_password] => 1
[sync_private_flag] => 1
[sync_post_format] => 1
[sync_delete] => 1
[sync_delete_tax] => 1
[sync_post_taxonomies] => 1
[sync_post_date] => 0
[sync_taxonomy_parents] => 0
[translation_pickup_method] => 0
[notify_complete] => 1
[translated_document_status] => 1
[remote_management] => 0
[auto_adjust_ids] => 1
[alert_delay] => 0
[promote_wpml] => 0
[automatic_redirect] => 0
[remember_language] => 24
[icl_lang_sel_copy_parameters] =>
[translated_document_page_url] => translate
[sync_comments_on_duplicates ] => 0
[seo] => Array
(
[head_langs] => 1
[canonicalization_duplicates] => 0
[head_langs_priority] => 1
)

[posts_slug_translation] => Array
(
[on] => 1
[string_name_migrated] => 1
)

[urls] => Array
(
[directory_for_default_language] => 0
[show_on_root] =>
[root_html_file_path] =>
[root_page] => 0
[hide_language_switchers] => 1
)

[xdomain_data] => 0
[custom_posts_sync_option] => Array
(
[post] => 1
[page] => 1
[attachment] => 1
[avia_framework_post] => 0
[portfolio] => 1
[custom_css] => 0
[customize_changeset] => 0
[oembed_cache] => 0
[user_request] => 0
[wp_block] => 0
)

[taxonomies_sync_option] => Array
(
[category] => 1
[post_tag] => 1
[translation_priority] => 1
[portfolio_entries] => 1
)

[tm_block_retranslating_terms] => 1
[admin_default_language] => _default_
[taxonomy_names_checked] => 1
[setup_complete] => 1
[ajx_health_checked] => 1
[default_categories] => Array
(
[da] => 1
[no] => 467
[sv] => 474
)

[default_language] => da
[setup_wizard_step] => 5
[translation-management] => Array
(
[custom_fields_translation] => Array
(
[algolia_posts_page_records_count] => 0
[algolia_posts_post_records_count] => 0
[algolia_searchable_posts_records_count] => 0
[cartrawler_location_id_value] => 1
[custom_ctid_value] => 0
[custom_permalink] => 0
[custom_title_value] => 2
[custom_titlfe_value] => 1
[head_office] => 0
[hefo_after] => 0
[hefo_before] => 0
[image] => 0
[menu_additional_info] => 0
[menu_pdf] => 0
[seo_follow] => 0
[seo_noindex] => 0
[title] => 2
[description] => 2
[keywords] => 2
[_edit_last] => 0
[_edit_lock] => 0
[_wp_page_template] => 0
[_wp_attachment_metadata] => 0
[original_post_id] => 0
[_wpml_original_post_id] => 0
[_wp_old_slug] => 0
[_icl_translator_note] => 0
[_alp_processed] => 0
[_pingme] => 0
[_encloseme] => 0
[_icl_lang_duplicate_of] => 0
[_thumbnail_id] => 0
[_wp_attached_file] => 0
[_wp_attachment_image_alt] => 2
[_yoast_wpseo_title] => 2
[_yoast_wpseo_bctitle] => 2
[_yoast_wpseo_metadesc] => 2
[_yoast_wpseo_metakeywords] => 2
[_yoast_wpseo_focuskw] => 2
[_yoast_wpseo_meta-robots-noindex] => 1
[_yoast_wpseo_meta-robots-nofollow] => 1
[_yoast_wpseo_meta-robots-adv] => 1
[_yoast_wpseo_canonical] => 0
[_yoast_wpseo_redirect] => 0
[_yoast_wpseo_opengraph-description] => 2
[_yoast_wpseo_google-plus-description] => 2
[_yoast_wpseo_twitter-title] => 2
[_yoast_wpseo_twitter-description] => 2
[_yoast_wpseo_opengraph-title] => 2
[_yoast_wpseo_opengraph-image] => 3
[_yoast_wpseo_twitter-image] => 3
[_aviaLayoutBuilder_active] => 1
[_avia_builder_shortcode_tree] => 3
[_aviaLayoutBuilderCleanData] => 0
[sidebar] => 3
[footer] => 3
[header_title_bar] => 3
[header_transparency] => 3
[layout] => 3
)

[custom_fields_readonly_config] => Array
(
[0] => title
[1] => description
[2] => keywords
[3] => _edit_last
[4] => _edit_lock
[5] => _wp_page_template
[6] => _wp_attachment_metadata
[7] => original_post_id
[8] => _wpml_original_post_id
[9] => _wp_old_slug
[10] => _icl_translator_note
[11] => _alp_processed
[12] => _pingme
[13] => _encloseme
[14] => _icl_lang_duplicate_of
[15] => _thumbnail_id
[16] => _wp_attached_file
[17] => _wp_attachment_image_alt
[18] => _yoast_wpseo_title
[19] => _yoast_wpseo_bctitle
[20] => _yoast_wpseo_metadesc
[21] => _yoast_wpseo_metakeywords
[22] => _yoast_wpseo_focuskw
[23] => _yoast_wpseo_meta-robots-noindex
[24] => _yoast_wpseo_meta-robots-nofollow
[25] => _yoast_wpseo_meta-robots-adv
[26] => _yoast_wpseo_canonical
[27] => _yoast_wpseo_redirect
[28] => _yoast_wpseo_opengraph-description
[29] => _yoast_wpseo_google-plus-description
[30] => _yoast_wpseo_twitter-title
[31] => _yoast_wpseo_twitter-description
[32] => _yoast_wpseo_opengraph-title
[33] => _yoast_wpseo_opengraph-image
[34] => _yoast_wpseo_twitter-image
[35] => _aviaLayoutBuilder_active
[36] => _avia_builder_shortcode_tree
[37] => _aviaLayoutBuilderCleanData
[38] => sidebar
[39] => footer
[40] => header_title_bar
[41] => header_transparency
[42] => layout
)

[custom_fields_translation_custom] => Array
(
)

[custom_fields_translation_custom_readonly] => Array
(
)

[doc_translation_method] => ATE
[__custom_types_readonly_config_prev] => Array
(
)

[custom_types_readonly_config] => Array
(
)

[__custom_fields_readonly_config_prev] => Array
(
[0] => title
[1] => description
[2] => keywords
[3] => _edit_last
[4] => _edit_lock
[5] => _wp_page_template
[6] => _wp_attachment_metadata
[7] => original_post_id
[8] => _wpml_original_post_id
[9] => _wp_old_slug
[10] => _icl_translator_note
[11] => _alp_processed
[12] => _pingme
[13] => _encloseme
[14] => _icl_lang_duplicate_of
[15] => _thumbnail_id
[16] => _wp_attached_file
[17] => _wp_attachment_image_alt
[18] => _yoast_wpseo_title
[19] => _yoast_wpseo_bctitle
[20] => _yoast_wpseo_metadesc
[21] => _yoast_wpseo_metakeywords
[22] => _yoast_wpseo_focuskw
[23] => _yoast_wpseo_meta-robots-noindex
[24] => _yoast_wpseo_meta-robots-nofollow
[25] => _yoast_wpseo_meta-robots-adv
[26] => _yoast_wpseo_canonical
[27] => _yoast_wpseo_redirect
[28] => _yoast_wpseo_opengraph-description
[29] => _yoast_wpseo_google-plus-description
[30] => _yoast_wpseo_twitter-title
[31] => _yoast_wpseo_twitter-description
[32] => _yoast_wpseo_opengraph-title
[33] => _yoast_wpseo_opengraph-image
[34] => _yoast_wpseo_twitter-image
[35] => _aviaLayoutBuilder_active
[36] => _avia_builder_shortcode_tree
[37] => _aviaLayoutBuilderCleanData
[38] => sidebar
[39] => footer
[40] => header_title_bar
[41] => header_transparency
[42] => layout
)

[__custom_term_fields_readonly_config_prev] => Array
(
)

[custom_term_fields_readonly_config] => Array
(
)

[taxonomies_readonly_config] => Array
(
[translation_priority] => 1
[portfolio_entries] => 1
)

[custom-types_readonly_config] => Array
(
[attachment] => 1
[avia_framework_post] => 0
[portfolio] => 1
)

[notification] => Array
(
[new-job] => 0
[include_xliff] => 0
[resigned] => 0
[completed] => 0
[completed_frequency] => 0
[overdue] => 0
[overdue_offset] => 0
)

[custom_fields_unlocked_config] => Array
(
[algolia_posts_page_records_count] => 0
[algolia_posts_post_records_count] => 0
[algolia_searchable_posts_records_count] => 0
[cartrawler_location_id_value] => 0
[custom_ctid_value] => 0
[custom_permalink] => 0
[custom_title_value] => 0
[custom_titlfe_value] => 0
[footer] => 0
[header_title_bar] => 0
[header_transparency] => 0
[head_office] => 0
[hefo_after] => 0
[hefo_before] => 0
[image] => 0
[layout] => 0
[menu_additional_info] => 0
[menu_pdf] => 0
[seo_follow] => 0
[seo_noindex] => 0
[sidebar] => 0
)

)

[custom-types_sync_option] => Array
(
[attachment] => 1
[avia_framework_post] => 0
[portfolio] => 1
)

[language_selector_initialized] => 1
[languages_order] => Array
(
[0] => da
[1] => no
[2] => sv
)

[dont_show_help_admin_notice] => 1
[site_key] => l3xEOsIxQu
[site_does_not_use_icl] => 1
[st] => Array
(
[WPML_ST_Upgrade_Db_Cache_Command_2.4.2_1_has_run] => 1
[WPML_ST_Upgrade_MO_Scanning_3_has_run] => 1
[strings_per_page] => 10
[icl_st_auto_reg] => disable
[strings_language] => en
[translated-users] => Array
(
)

[db_ok_for_gettext_context] => 1
[sw] => Array
(
)

[WPML_ST_Upgrade_Migrate_Originals_has_run] => 1
[WPML_ST_Upgrade_Display_Strings_Scan_Notices_has_run] => 1
[WPML_ST_Upgrade_DB_String_Name_Index_2_has_run] => 1
[WPML_ST_Upgrade_DB_Longtext_String_Value_has_run] => 1
[plugin_localization_domains] => Array
(
[simple-custom-css/simple-custom-css.php] => Array
(
[simple-custom-css] => 17
)

[akismet/akismet.php] => Array
(
[akismet] => 226
)

[wordpress-seo/wp-seo.php] => Array
(
[wordpress-seo] => 1802
)

[woo-bulk-edit-products/products.php] => Array
(
[freemius] => 560
)

[redux-framework/redux-framework.php] => Array
(
[redux-framework] => 189
)

[wp-sheet-editor-premium/wp-sheet-editor.php] => Array
(
[freemius] => 569
)

[wpml-translation-management/plugin.php] => Array
(
[wpml-translation-management] => 1002
)

[wpml-string-translation/plugin.php] => Array
(
[wpml-string-translation] => 287
)

[redirection/redirection.php] => Array
(
[redirection] => 27
)

[sitepress-multilingual-cms/sitepress.php] => Array
(
[sitepress] => 1343
[installer] => 1210
)

[post-views-counter/post-views-counter.php] => Array
(
[post-views-counter] => 128
)

[query-monitor/query-monitor.php] => Array
(
[query-monitor] => 286
)

)

[theme_localization_domains] => Array
(
[enfold] => Array
(
[avia_framework] => 14145
[avia_builder] => 2
[woocommerce] => 14
[WordPress] => 135
[woothemes] => 194
[LayerSlider] => 5362
[installer] => 4
[Layer] => 2
[envato] => 8
[wordpress-importer] => 108
[tgmpa] => 116
[underside-menu] => 6
)

)

[use_header_text_domains_when_missing] => 0
)

[admin_text_3_2_migration_complete_40cd750bba9870f18aada2478b24840a] => 1
[admin_text_3_2_migration_complete_c5ce85a41fce4a2846e49cee132b1b60] => 1
[xliff_newlines] => 2
[tm_xliff_version] => 12
[language_domains] => Array
(
[no] => hidden link
[sv] => hidden link
)

[language_per_domain_sso_enabled] =>
[translation_service] =>
[translator_choice] =>
[icl_lang_status] =>
[icl_html_status] =>
[icl_current_session] =>
[last_icl_reminder_fetch] =>
[translators_management_info] =>
[language_pairs] =>
[icl_translation_projects] =>
[custom_posts_unlocked_option] => Array
(
[post] => 0
[page] => 0
[attachment] => 0
[custom_css] => 0
[customize_changeset] => 0
[oembed_cache] => 0
[user_request] => 0
[wp_block] => 0
[portfolio] => 0
[avia_framework_post] => 0
)

[doc_translation_method] => ATE
[hide_how_to_translate] => 1
[translation_memory] => 1
[taxonomies_unlocked_option] => Array
(
[category] => 0
[post_tag] => 0
[translation_priority] => 0
[portfolio_entries] => 0
)

[edit_languages_flag_migration] => 1
[show_translations_flag] => 1
[WPML_Translate_Link_Target_Global_State] => 1
[admin_text_3_2_migration_complete_c432e7bf0b017c6b3c54c904ec970cb4] => 1
[store_frontend_cookie] => 0
[theme_localization_load_textdomain] => 0
[gettext_theme_domain_name] =>
[sync_comments_on_duplicates] => 0
[just_reactivated] => 0
[hidden_languages] => Array
(
[0] => no
)

[content_translation_languages_setup] =>
[content_translation_setup_complete] =>
[content_translation_setup_wizard_step] =>
[icl_balance] =>
[icl_support_ticket_id] =>
[last_get_translator_status_call] =>
[icl_account_email] =>
[site_id] =>
[access_key] =>
[ts_site_id] =>
[ts_access_key] =>
)

May 2, 2019 at 12:04 pm #3724313

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Right now when we crawl our .se site, we find our .dk page content.

May I ask how do you crawl your site and are we able to see the results? Is it a sitemap perhaps, or?

As for this:

So if i visit hiddenurl.se/link-is-not-translated i need to be send to hiddenurl.se

Can I see the URL of any hidden/broken links and test myself?

Regards,
Bruno Kos

May 2, 2019 at 12:23 pm #3724451

lars-kroghJ

hidden link
Send us over to hidden link

So what it needs is not to send us to .info domain, but send us to hidden link

May 2, 2019 at 2:12 pm #3725521

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

So what it needs is not to send us to .info domain, but send us to hidden link;

Since I can see "hidden link" url when I hover over the Swedish flag in the footer, can you tell me if this worked before? Have you done any redirection changes on your site, using various plugins, htaccess or through other means?

Is this the only page in question where the issue occurs?

Regards,
Bruno Kos

May 2, 2019 at 3:59 pm #3726391

lars-kroghJ

It. Have always been so.
Their are no redirects or what ever setup.
It's standard wpml settings.

May 3, 2019 at 7:19 am #3731437

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Can I ask you the following then? In order to debug this issue , can you install Duplicator plugin and create package so that I can try this on my localhost and possibly escalate further to 2nd tier?

https://wpml.org/faq/provide-supporters-copy-site/

Let me know if this is OK with you.

If yes, I will need WordPress admin username and password so I could download those packages. I have marked your next reply private so you can safely add this information.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
Please make a full backup of your site before sharing this info!

Regards,
Bruno Kos

May 3, 2019 at 12:18 pm #3734065

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

When I open hidden link and click Edit Side at the top, page editor of this page opens and within I can see that this page does not have any translations, meaning that hidden link does not exist.

Have you tried translating this page into Swedish to see if the issue is still there?

Regards,
Bruno Kos

May 3, 2019 at 12:24 pm #3734139

lars-kroghJ

i know that its not translated.
That is why we are seeing the DK content and not a swedish content.
But google are still able to find the url, so that means it can be index.

So please read the case again.

We need it to return a 404 error if the page is not translated and not send us/the customers to the danish version of the content. !

Can you make that happen

May 3, 2019 at 1:07 pm #3734537

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

I apologize for that - can you check this answer and tell me if this give some idea on what's behind this?
https://wpml.org/forums/topic/if-there-is-no-translation-it-doesmt-leads-to-404/#post-2238096

Regards,
Bruno Kos

The topic ‘[Closed] Google / Semrush find wrong not translated pages + redirect to default lang’ is closed to new replies.