carbon-fields icon indicating copy to clipboard operation
carbon-fields copied to clipboard

Problem with tabs names in Cyrillic

Open Dimox opened this issue 8 years ago • 2 comments

Version

  • Carbon Fields: 2.2.0
  • WordPress: 4.9.4
  • PHP: 7.1

Expected Behavior

After saving, the tab on which we were located should be active.

Actual Behavior

If the names of tabs in Cyrillic, after saving, the first tab is always active.

Container definition

use Carbon_Fields\Container;
use Carbon_Fields\Field;

Container::make( 'theme_options', 'Настройки темы' )
	->set_page_menu_position( 60 )


	->add_tab( 'Страницы', array(

		// страница
		Field::make( 'association',
			'homepage',
			'Выберите страницу, текст которой отобразится на главной'
		)
			->set_types(array(
				array(
					'type' => 'post',
					'post_type' => 'page',
				),
			))
			->set_max(1)
			->help_text( '<p>Для выбора кликните на нужную страницу.</p>' )
		,

	)) // end tab


	->add_tab( 'Рубрики', array(

		// несколько рубрик
		Field::make( 'association',
			'homecats',
			'Выберите рубрики с последними записями на главной'
		)
			->set_types(array(
				array(
					'type' => 'term',
					'taxonomy' => 'category',
				),
			))
			->help_text( '<p>Для выбора кликните на нужную рубрику. В правом столбике можно выставить рубрики в нужном порядке.</p>' )
		,

	)) // end tab


;

Steps to Reproduce the Problem

  1. Switch to 'Рубрики' tab. Save changes.
  2. The 'Рубрики' tab is must be active, but 'Страницы' tab is active.

Dimox avatar Mar 19 '18 07:03 Dimox

Hi @Dimox ,

I've fixed the problem with Cyrillic names in the development version. This will be added in the next release.

Use composer require htmlburger/carbon-fields "2.2.*@dev" to get the development version of 2.2

deqngeorgiev avatar Mar 30 '18 07:03 deqngeorgiev

Many thanks!

Dimox avatar Mar 30 '18 10:03 Dimox