Neve Theme & BuddyPress & GTranslate.io plugin
-
Dear Neve Theme Developers,
i have noticed that the Neve theme is not compatible with BuddyPress when combined with the https://www.gtranslate.io plugin!
Below is my chat transcript:###
Re: Hi again, it seems i have css issues on my members page https://www.parallelhearts.one/members/ for translated pages:
###
Hi,
It is good now.
The logic of buddypress ajax calls is based on page Referer header and when there is language code the logic breaks. So I have modified wp-content/plugins/buddypress/bp-core/bp-core-functions.php file (attached) to remove the language code from the Referer:
function bp_get_referer_path() {
$referer = wp_get_referer();if ( false === $referer ) {
return false;
}// Turn into an absolute path.
$referer = preg_replace( ‘|https?\://[^/]+/|’, ‘/’, $referer );// gtranslate + remove language from path /xx/ -> /
if(isset($_SERVER[‘HTTP_X_GT_LANG’]))
$referer = substr($referer, strlen($_SERVER[‘HTTP_X_GT_LANG’]) + 1);return $referer;
}
Please note that future updates to buddypress plugin will revert my changes back. So you have to apply my change with every update.Alternatively you can use our sub-domain URL structure, so that the directory structure does not change and it will be OK. You can also contact buddypress developers and ask them to apply my change.
Thanks! ??
###
Hi Edvard and thanks,
it seems it’s a template issue because when using different templates I did not encounter issues. However, my template has on average a 99% score in Web Core Metrics along with GTmetrix since the Neve theme is celebrated as the fastest template. Meaning contacting BuddyPress will result in them saying to use a compatible template. Secondly, using subdomains will work against my rankings and link juice.
So my solution if necessary, is to pay you to create an addon with your code, this way I don’t need to worry about BP updates, thus manually inserting your code. Sounds good?
###
Hi,
You better consult with your theme developer in that case, I have noticed that they use bp_get_referer_path function to render their template.
buddypress/bp-templates/bp-nouveau/includes/template-tags.php it calls function bp_nouveau_get_loop_classes which depends on bp_get_referer_path, your theme developer can modify it a little to possibly avoid using referer header at all.
Thanks! ??
The page I need help with: [log in to see the link]
- The topic ‘Neve Theme & BuddyPress & GTranslate.io plugin’ is closed to new replies.