Comments (1)
I seem to have a solution to this problem. The errors are gone, but it would be useful if someone else verified the operation of this code.
In inc/plugins/google_seo/plugin.php Change this:
if($mybb->config['database']['encoding'] != 'utf8mb4')
{
$warning[] = $lang->sprintf($lang->googleseo_plugin_warn_encoding,
$mybb->config['database']['encoding']);
}
For:
if (isset($mybb->config['database']) && is_array($mybb->config['database']) &&
isset($mybb->config['database']['encoding']) && $mybb->config['database']['encoding'] != 'utf8mb4')
{
$warning[] = $lang->sprintf($lang->googleseo_plugin_warn_encoding, $mybb->config['database']['encoding']);
}
And change this:
if($settings['google_seo_redirect'])
{
$success[] = $lang->googleseo_plugin_redirect;
if(!$settings['google_seo_url'])
{
$warning[] = $lang->googleseo_plugin_redirect_warn_url;
}
$current_url = google_seo_redirect_current_url();
$pos = my_strpos($current_url, "/{$config['admin_dir']}/index.php");
if($pos)
{
$current_url = my_substr($current_url, 0, $pos);
}
if(!$settings['bburl'] || $settings['bburl'] != $current_url)
{
$warning[] = $lang->sprintf($lang->googleseo_plugin_redirect_warn_bburl,
htmlspecialchars($settings['bburl'], ENT_COMPAT, "UTF-8"),
htmlspecialchars($current_url), ENT_COMPAT, "UTF-8");
}
}
else
{
$error[] = $lang->googleseo_plugin_redirect;
}
For this:
if(isset($settings['google_seo_redirect']) && is_array($settings['google_seo_redirect']))
{
if($settings['google_seo_redirect'])
{
$success[] = $lang->googleseo_plugin_redirect;
if(isset($settings['google_seo_url']) && !$settings['google_seo_url'])
{
$warning[] = $lang->googleseo_plugin_redirect_warn_url;
}
$current_url = google_seo_redirect_current_url();
$pos = my_strpos($current_url, "/{$config['admin_dir']}/index.php");
if($pos !== false)
{
$current_url = my_substr($current_url, 0, $pos);
}
if(isset($settings['bburl']) && (!$settings['bburl'] || $settings['bburl'] != $current_url))
{
$warning[] = $lang->sprintf($lang->googleseo_plugin_redirect_warn_bburl,
htmlspecialchars($settings['bburl'], ENT_COMPAT, "UTF-8"),
htmlspecialchars($current_url), ENT_COMPAT, "UTF-8");
}
}
else
{
$error[] = $lang->googleseo_plugin_redirect;
}
}
from mybb-google-seo.
Related Issues (20)
- Move post option not working with Google SEO URLs enabled HOT 7
- Not compatible with PHP 7 HOT 1
- Redirection of links due to forum migration? HOT 5
- [Request] Meta Tag Variable or Open Graph implantation HOT 4
- Not compatible with PHP 7.*? HOT 11
- Changing meta description for threads? HOT 4
- URL Scheme keeps switching
- Poor PostgreSQL Compatibility HOT 4
- How to make it add rel canonical tag to index.php?
- 404 widget removal or replacement
- Redirection problem HOT 1
- 404 Chinese Website HOT 1
- google bot noindex problem HOT 9
- multipage() workaround improvements
- Error 404 is not working on Windows Server 2019 HOT 3
- No sitemap
- Sitemap could not be read
- Allow for default meta description for the frontpage?
- Custom 404 page feature?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybb-google-seo.