JReviews has always had a strong focus in SEO and comes with functionality to add Schema.org markup, Open Graph and Twitter tags. It also allows using internal features like media and custom fields as part of this functionality which is something 3rd party solutions cannot do unless support is added specifically for them.
If you are using 4SEO for your site, it will add all these SEO features for core functionality and some 3rd party solutions. However, this creates a problem with duplication in JReviews listings. JReviews has it's own data and in some cases may do things differently. So in this case, the recommended solution is to disable the 4SEO tags in JReviews listings to avoid duplication.
This can be done programatically using 4SEO hooks
If you are not using hooks yet, you'll need to create the file at:
/libraries/weeblr/forseo_functions.php
(when using Joomla)
Then paste the code below to disable 4SEO in JReviews listing detail pages.
<?php
/**
* 4SEO hooks file
*
* You can use 2 variables to access 4SEO content:
*
* $factory: access variables
* $hooks: add handlers
*/
defined('WBLIB_EXEC') || die;
use JReviews\App\Models\Listing;
function forSeoDisableForJReviews($injectData, $pageData) {
$requestVars = $pageData->get('input_vars');
$option = $requestVars['option'] ?? '';
$view = $requestVars['view'] ?? '';
$id = $requestVars['id'] ?? false;
if ($option !== 'com_content' && $view !== 'article') {
return $injectData;
}
if ($id && Listing::select('id')->withoutGlobalScope('excludeNotNeededForCount')->find($id)) {
return false;
}
return $injectData;
}
$hooks->add('forseo_should_inject_seo_data', 'forSeoDisableForJReviews');
$hooks->add('forseo_should_inject_structured_data', 'forSeoDisableForJReviews');