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 thread is resolved. Here is a description of the problem and solution.

Problem:
forums links in buddypress menu have wrong redirection when wpml is active
Solution:
- Into functions.php of your child theme, add the following:

add_filter( 'parse_query', 'buddyboss_wpml_fix_redirection' , 5 );

function buddyboss_wpml_fix_redirection ($q) {
	if ( bp_current_component() == 'forums' && bp_current_action() == 'topics' ) {
	    if ( isset( bp_core_get_directory_pages()->members->id ) ) {
		$q->set( 'page_id', bp_core_get_directory_pages()->members->id );
	    }
	}
}

Relevant Documentation:
https://wpml.org/forums/topic/compatibility-issues-with-buddyboss/#post-4321155

100% of people find this useful.

This topic contains 12 replies, has 2 voices.

Last updated by Bruno Kos 3 months ago.

Assigned support staff: Bruno Kos.

Author Posts
August 13, 2019 at 6:44 am #4385293

danielF-60

when clicking on a forums link it redirects to hidden link instead of hidden link

this happens only when plugin wpml cms is active

August 13, 2019 at 10:07 am #4386891

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

Can you please have a look at this thread? I think that the issue is the same:
https://wpml.org/forums/topic/compatibility-issues-with-buddyboss/

The solution that worked for the client is here:
https://wpml.org/forums/topic/compatibility-issues-with-buddyboss/#post-4321155

Regards,
Bruno Kos

August 13, 2019 at 10:15 am #4386943

danielF-60

Hello Bruno

I added the code in the functions-file of the childtheme but the problem remains...

What else can I try?

Thanks for your help

Regards
Daniel

August 13, 2019 at 11:55 am #4387687

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I see - how about we go this route then?

One Click Login
hidden link
Username:demo
Password:dtQnUEUb5435

This is a clean WordPress installation where I configured both WPML and BuddyPress. Can you set any of the profiles on that site so that we can see if it is working in this default setup and provide me with the URL?

That may help us narrow down to see if the issue on your site is related to any of the other plugins or perhaps a theme overriding some of the BuddyPress settings.

Regards,
Bruno Kos

August 13, 2019 at 12:11 pm #4387779

danielF-60

Please send me a hidden form so I can send you the credentials to login to the site. The site will go online by the end of this week and I need to get this fixed asap. Would this be possible? you can also duplicate the website to test it on another server.

August 13, 2019 at 12:19 pm #4387911

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I have marked your next reply as private. However, can you try this also? Please check if this issue appears when:

- only WPML plugins are activated, as it will tell us if there is an interaction issue with other plugin
- theme is set to a WordPress default like Twenty Nineteen as it will tell us if there is an interaction issue with your theme

Please make a full backup of your site before trying this or make these changes on a staging/development site!

You can use plugins such as UpdraftPlus WordPress Backup Plugin (https://wordpress.org/plugins/updraftplus/) or ask your host to perform a site backup.

Regards,
Bruno Kos

August 13, 2019 at 12:23 pm #4387993

danielF-60

I did change to the twentynineteen theme but the problem was not gone....

August 13, 2019 at 12:38 pm #4388109

danielF-60

I already tried to disable all the plugins - believe me i investigated hours because of this problem. maybe you are able to find it in a couple of minutes!?

August 13, 2019 at 12:47 pm #4388123

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

In this case, can you please proceed based on this:
https://wpml.org/forums/topic/forums-links-in-buddypress-menu-have-wrong-redirection-when-wpml-is-active/#post-4387687

Because I would try the same as well (deactivating plugins), so we need to exclude that this is a bug indeed. BuddyPress is very complex, not to mention that we also have a glue plugin for it, so finding any issue there is not simple at all, especially when it comes to redirection issues...

It will take you few minutes at most to set this up, I promise :).

Regards,
Bruno Kos

August 13, 2019 at 12:59 pm #4388245

danielF-60

do you really want me to install 28 plugins on this wordpress installation?

August 13, 2019 at 1:06 pm #4388287

danielF-60

I had to delete page named forums so the code in the functions.php file worked! thanks a lot!
My issue is resolved now. Thank you!

August 13, 2019 at 1:08 pm #4388295

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

do you really want me to install 28 plugins on this wordpress installation?

No :). You only need to set any of the profiles on my sandbox setup. Is your issue visible if you leave only BuddyPress active, so not other plugins or addons (apart from WPML)?

That is what I need to see there - e.g. when I open this:
hidden link

I see no forums, so I guess it needs to be set int he same way on your site so that we can identify the issue (if there).

In the meantime, can you install Duplicator plugin and create package so that I can try this on my localhost and possibly escalate further to 2nd tier? In case we see this working properly on a clean install.

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!

On a side note, see this:
https://wpml.org/forums/topic/buddypress-pages-redirected-to-other-pages/#post-1193888

But this is an old thread and I am not sure if this has been implemented already:
https://wpml.org/forums/topic/buddypress-pages-redirected-to-other-pages/#post-1193888

Regards,
Bruno Kos

August 13, 2019 at 1:09 pm #4388323

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Now that's great, happy to hear that we are good to go! 🙂

Regards,
Bruno Kos