Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
Our partnership team will contact the plugin author, and I'll get back to you as soon as we get a reply.
Thanks for your patience
Best regards,
Osama
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
1) Thanks for your reply. The old sandbox is expired because the ticket was closed due to inactivity.
2) The issue was not replicated on the sandbox because you had another urgent issue.
3) Our partnership team contacted the plugin author regarding this issue and waiting for his reply. I'll update you here as soon as I get their reply.
Thanks for your patience
Best regards,
Osama
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
The plugin author provided us with a pro license to test the issue. I tried to replicate the issue, so please check the sandbox site and let me know if that is the same issue you face.
The knowledgebase slug is not translated correctly when switching the language. Kindly check the following pages and try to switch the language.
1) hidden link
2) hidden link
You will notice that the [kb1-es] is not changed to [kb1]. The same happens when switching from English to Spanish.
Best regards,
Osama
|
alexeyK-12
|
Hello)
Do not quite understand...
I recorded a video for you, which in my opinion can be a step towards solving the original problem.
I don't understand how I can match a similar problem or not...on your site (maybe yes..similar).
Perhaps the links (in my video, when I go to another level) are somewhere else formed ... and they need to be changed?
P.S.
this link: hidden link
gives the following error: hidden link
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
1) I think the video URL is missing from your previous reply. Could you please send it again?
2) Please check the pages on the sandbox and let me know if you face the same issue. I fixed the fatal error.
Best regards,
Osama
|
alexeyK-12
|
1. Here is a video everything where you can see that we did as you asked hidden link
Did not help.
2. as you see in the video... a similar problem as on your sandbox site when clicking on the buttons (with a link)
When changing the language, we are simply thrown to a higher level, and not left on the same page simply with a change in language.
And we still created a test site.
Here you can test everything you need.
I'll send you a private message.
Give me that opportunity.
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
Thanks for your update. I've just received our compatibility team's reply. They have found a workaround by the following steps.
1- Open the (wp-content\plugins\betterdocs-pro\includes\class-multiple-kb.php) file
2- Replace the following snippet (around line 695):
public static function doc_category_link($termlink, $term, $taxonomy)
{
if ($taxonomy != 'doc_category') return $termlink;
$kb_slug = self::kb_slug();
if (empty($kb_slug)) {
$category = get_term_by('slug', $term->slug, $taxonomy, ARRAY_A);
$kb_arr = get_term_meta($category['term_id'], 'doc_category_knowledge_base', true);
if (empty($kb_arr[0])) {
$kb_slug = 'non-knowledgebase';
} else {
$kb_slug = $kb_arr[0];
}
}
return str_replace('%knowledge_base%', $kb_slug, $termlink);
}
With:
public static function doc_category_link($termlink, $term, $taxonomy)
{
if ($taxonomy != 'doc_category') return $termlink;
$kb_slug = self::kb_slug();
// WPML Workaround for compsupp-6478
if (class_exists('SitePress')) {
$kb_arr = get_term_meta($term->term_id, 'doc_category_knowledge_base', true);
$kb_slug = $kb_arr[0];
}
if (empty($kb_slug)) {
$category = get_term_by('slug', $term->slug, $taxonomy, ARRAY_A);
$kb_arr = get_term_meta($category['term_id'], 'doc_category_knowledge_base', true);
if (empty($kb_arr[0])) {
$kb_slug = 'non-knowledgebase';
} else {
$kb_slug = $kb_arr[0];
}
}
return str_replace('%knowledge_base%', $kb_slug, $termlink);
}
I've applied this workaround to the sandbox. Kindly check and let me know if that fixed the issue on the sandbox.
Thanks for your cooperation and patience
Regards,
Osama
|
alexeyK-12
|
I passed it on to our specialist.
Although I don't understand...about the sandbox...
I can give you access to the test site we set up.
You will have the opportunity to completely create and test everything yourself without any problems, as our knowledge may not be enough.
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
Kindly let me know the result of applying the workaround on your staging site. If it doesn't fix the issue, I'll enable the private reply, so you can share the access details safely.
Thanks,
Osama
|
alexeyK-12
|
Osama, hi. You are a genius.
Thank you very much for solving such an important and long-standing problem.
Here is a video where everything works: hidden link (5 days available). Look at the ending of Guide and Guides, why is it one moment one thing and another another moment another?
BUT THERE ARE MORE QUESTIONS
You recommended this to us earlier: https://wpml.org/forums/topic/language-switcher-not-working-properly/page/2/#post-12028837
we did it.
Can we return everything as it was before the implementation of these recommendations of yours? Or if we return that switching of language will not work?
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
1) Thanks for your update. It's great to hear that everything is working correctly. The guide and guides slugs are different because the guide page's slug is "guides" while the knowledgebase slug is "guide".
2) Please take a backup and return the things as you wish and test if they will work correctly.
Best regards,
Osama
|
alexeyK-12
|
Hey Osama.
We got everything back
https://wpml.org/forums/topic/language-switcher-not-working-properly/page/2/#post-12028837
tested and switching languages (pages) works even without changing the Guide slug to Guides
hidden link
It turns out the question is closed))
Thanks
|
Osama Mersal
Supporter
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+02:00)
|
Hi,
It's great to hear that the issue is fixed now. Please don't hesitate to open a new ticket if you face any issues in the future.
Have a nice day!
Best regards,
Osama
|