• Resolved shitpoet

    (@shitpoet)


    The plugin worked ok locally. But resulted in white screens on all pages that have action in query (for example on opening a woocommmerce product) or when one presses Save button on (almost?) any page, even on general WP settings page.

    I like the plugin, and i wonder what can be wrong?

    I moved my local WP install on dev server by exporting mysql db using

    mysqldump -uUSER -p DB > db.sql

    and importing it by

    mysql -uUSER -p DB < db.sql

    and then replacing localhost in db by actual name of dev host.

    Usually this procedure works ok for all plugins and data.

    • This topic was modified 7 years ago by shitpoet.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Denis Yanchevskiy

    (@denisco)

    Hello @shitpoet,

    Try to enable WP_DEBUG. After that, open the page with the problem, there should be the cause of the error.

    Thread Starter shitpoet

    (@shitpoet)

    i discovered that the problem is with mb_strtolower. it is an extension on php7, so it is not installed on my remote dev server.

    it is used in function translierate

    so i can easily solve my problem on dev server, but i do not know about production server yet.

    but what i think is if we do lower the string in the end, why not just make symbol_table be in lower case in the first place? what do you think?

    	public function transliterate( $string ) {
    		// define symbols table
    		$symbol_table = array(
    			'А'	 => 'A', 'Б'	 => 'B', 'В'	 => 'V', 'Г'	 => 'G', 'Д'	 => 'D',
                         [snip]
    		);
    
    		$symbol_table = apply_filters( 'dco_rf_symbol_table', $symbol_table );
    
    		// transliterate
    		$dco_string	 = strtr( $string, $symbol_table );
    		$dco_string	 = preg_replace( "/[^A-Za-z0-9<code></code>
    '_\-\.]/", '-', $dco_string );
    
    		return apply_filters( 'dco_rf_transliterate', mb_strtolower( $dco_string, 'UTF-8' ), $string, $symbol_table );
    	}

    trace:

    Call to undefined function mb_strtolower()
    return apply_filters( 'dco_rf_transliterate', mb_strtolower( $dco_string, 'UTF-8' ), $string, $symbol_table ); 
    Backtrace from Exception
    In /var/www/bv-store/wp/wp-content/plugins/dco-russian-fixes/class.dco-russian-fixes-base.php [line 65]:
    
    /var/www/bv-store/wp/wp-includes/class-wp-hook.php [line 288] calling transliterate()
    /var/www/bv-store/wp/wp-includes/plugin.php [line 203] calling apply_filters()
    /var/www/bv-store/wp/wp-includes/formatting.php [line 1945] calling apply_filters()
    /var/www/bv-store/wp/wp-admin/includes/menu.php [line 60] calling sanitize_title()
    /var/www/bv-store/wp/wp-admin/menu.php [line 286] calling require_once()
    /var/www/bv-store/wp/wp-admin/admin.php [line 140] calling require()
    /var/www/bv-store/wp/wp-admin/options-general.php [line 10] calling require_once()
    • This reply was modified 7 years ago by shitpoet.
    • This reply was modified 7 years ago by shitpoet.
    Plugin Author Denis Yanchevskiy

    (@denisco)

    Thank you for the detailed answer.

    but what i think is if we do lower the string in the end, why not just make symbol_table be in lower case in the first place? what do you think?

    The function mb_strtolower is used to convert file names to lowercase. For example, you uploaded the file TUUYY.jpg, after processing it will turn into tuuyy.jpg (not all servers correctly handle uppercase in file names).

    I added dco_rf_disable_transliterate_lower filter to disable processing transliterate string with mb_strtolower function.

    You can update the plugin and use snippet add_filter('dco_rf_disable_transliterate_lower', '__return_true'); to disable mb_strtolower function.

    Plugin Author Denis Yanchevskiy

    (@denisco)

    I marked this topic as resolved. You will be able to open it again if you have any additional questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Crashes WP on moved-to domain’ is closed to new replies.