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.
Tagged: Bug
This topic contains 5 replies, has 2 voices.
Last updated by Bruno Kos 1 year, 7 months ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
July 22, 2023 at 4:01 am #14082545 | |
markC-59 |
I am trying to: activate the WPML Multilingual CMS plugin, and I get some issues reported on the back end and front end when I do. BACKEND FRONTEND Link to a page where the issue can be seen: hidden link |
July 24, 2023 at 6:17 am #14085661 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support! Can you please provide us with the debug information, so that we can get a better idea of your setup? https://wpml.org/faq/provide-debug-information-faster-support/ Regards, |
July 24, 2023 at 6:39 am #14085861 | |
markC-59 |
Here it is |
July 24, 2023 at 7:10 am #14086035 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Ok, can you check: According to internal ticket, it is being worked on for the release of WPML 4.6.5., so the fix was not yet resolved in the current version. In the meantime you can use the above workaround. |
July 24, 2023 at 7:16 am #14086157 | |
markC-59 |
My line 16 looks different that what that thread you linked to describes |
July 24, 2023 at 7:34 am #14086451 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
But it looks the same to me? Just replace your public function filter_include_url( $result ) with: public function filter_include_url( $result ) { if ( $result ) { $domains = wpml_get_setting_filter( array(), 'language_domains' ); $domains = preg_replace( '#^(http(?:s?))://#', '', array_map( 'untrailingslashit', $domains ) ); if ( (bool) $domains === true ) { $php_host_in_domain = wpml_parse_url( $result, PHP_URL_HOST ); $domains[] = wpml_parse_url( $this->get_unfiltered_home(), PHP_URL_HOST ); foreach ( $domains as $dom ) { if ($php_host_in_domain) { if ( strpos( trailingslashit( $php_host_in_domain ), trailingslashit( $dom ) ) === 0 ) { $http_host_parts = explode( ':', $this->requested_host ); unset( $http_host_parts[1] ); $http_host_without_port = implode( $http_host_parts ); $result = str_replace( $php_host_in_domain, $http_host_without_port, $result ); break; } } } } } return $result; } |