oneumyvakin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Unknown column 'wp_' error when installing WordPress 4.6Yes, it’s write permission issue.
On Plesk for Windows you need to set “Additional read/write permissions” in domain’s “Hosting Settings”.Forum: Installing WordPress
In reply to: Cannot install 4.6, “phpmailerException” errorI’ve get this issue at managing WordPress via wp-cli
The root cause in fact that $_SERVER[‘SERVER_NAME’] is empty in CLI mode:
\wp-includes\pluggable.php(352): PHPMailer->setFrom(‘wordpress@’, ‘WordPress’, false)
if ( !isset( $from_email ) ) { // Get the site domain and get rid of www. $sitename = strtolower( $_SERVER['SERVER_NAME'] ); if ( substr( $sitename, 0, 4 ) == 'www.' ) { $sitename = substr( $sitename, 4 ); } $from_email = 'wordpress@' . $sitename; } /** * Filters the email address to send from. * * @since 2.2.0 * * @param string $from_email Email address to send from. */ $from_email = apply_filters( 'wp_mail_from', $from_email ); /** * Filters the name to associate with the "from" email address. * * @since 2.3.0 * * @param string $from_name Name associated with the "from" email address. */ $from_name = apply_filters( 'wp_mail_from_name', $from_name ); $phpmailer->setFrom( $from_email, $from_name, false );
_
it can be easily fixed by changing in /wp-content/plugins/nextgen-gallery/nggallery.php call load_plugin_textdomain to:
function _register_hooks() { // Load text domain load_plugin_textdomain( NEXTGEN_GALLERY_I8N_DOMAIN, true, plugin_basename($this->directory_path('lang')) );
Looks like it happens because of absolute path to mo file concatenated with path to plugin dir:
/wp-content/plugins/nextgen-gallery/nggallery.php
function _register_hooks() { // Load text domain load_plugin_textdomain( NEXTGEN_GALLERY_I8N_DOMAIN, true, $this->directory_path('lang') );
$this->directory_path(‘lang’) – returns like ‘C:\Inetpub\vhosts\domain.tld\httpdocs\wordpress\wp-content\plugins\nextgen-gallery\lang’
because it get path from __FILE__ constant.
and than in /wp-includes/l10n.php
function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) { $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); if ( false !== $plugin_rel_path ) { $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); } else if