Recent Topics

1 Mar 22, 2008 15:23    

There is no problem with lowercase letters, but when I add a tag with capital letter(s) it returns MySQL Duplicate entry error.

2 Mar 30, 2008 17:04

What is your exact version of b2evo?

I belive this has been fixed in 2.4.1 but I'm not sure I remember well.

4 Apr 09, 2008 01:42

ok, I hope this will be solved when we actually handle url names / slugs for the tags instead of just trying to lowercase them.

5 Sep 06, 2008 22:37

Here's a temporarily solution if mbstring extension is loaded

Find and replace the function in inc/items/model/_item.class.php
in b2evo 2.4.2 on line 1228
in b2evo 2.5 on line 1380

function set_tags_from_string( $tags )
{
	if( empty($tags) )
	{
		$this->tags = array();
	}
	else
	{
		$this->tags = preg_split( '/[;,]+/', $tags );
	}
	
	if( function_exists( 'mb_strtolower' ) && function_exists( 'mb_detect_encoding' ) )
	{
		array_walk( $this->tags, create_function( '& $tag', '$tag = mb_strtolower(trim($tag), mb_detect_encoding($tag));' ) );
	}
	else
	{
		array_walk( $this->tags, create_function( '& $tag', '$tag = strtolower(trim($tag));' ) );
	}
	$this->tags = array_unique( $this->tags );
	$this->tags = array_diff( $this->tags, array('') );	// empty element can sneak in when ending with ,,
	// pre_dump( $this->tags );
}

6 Feb 23, 2009 21:33

Appears to be committed to HEAD.
Should have been marked with some "TEMP" comment and a reference to here, I believe.

Thanks (anyway)!

7 Feb 24, 2009 01:18

Sorry, next time I'll add a link :)


Form is loading...