• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Error Please enter a message with no more than 140 characters??

#1
hello
I encountered a error and i want to get the help of you.

When i Send a message profile.An error occurred

Please enter a message with no more than 140 characters.

I want my message more than 140 characters.

How do i install?

Thanks.!!!
 

Jake Bunce

XenForo moderator
Staff member
#3
It's hard-coded:

library/XenForo/DataWriter/DiscussionMessage/ProfilePost.php

Code:
	protected function _messagePreSave()
	{
		if ($this->get('user_id') == $this->get('profile_user_id') && $this->isChanged('message'))
		{
			// statuses are more limited than other posts
			$message = $this->get('message');
			$maxLength = 140;

			$message = preg_replace('/\r?\n/', ' ', $message);

			if (utf8_strlen($message) > $maxLength)
			{
				$this->error(new XenForo_Phrase('please_enter_message_with_no_more_than_x_characters', array('count' => $maxLength)), 'message');
			}

			$this->set('message', $message);
		}
	}
 
#6
It's hard-coded:

library/XenForo/DataWriter/DiscussionMessage/ProfilePost.php

Code:
    protected function _messagePreSave()
    {
        if ($this->get('user_id') == $this->get('profile_user_id') && $this->isChanged('message'))
        {
            // statuses are more limited than other posts
            $message = $this->get('message');
            $maxLength = 140;
 
            $message = preg_replace('/\r?\n/', ' ', $message);
 
            if (utf8_strlen($message) > $maxLength)
            {
                $this->error(new XenForo_Phrase('please_enter_message_with_no_more_than_x_characters', array('count' => $maxLength)), 'message');
            }
 
            $this->set('message', $message);
        }
    }
1500 set it and it works.
But how do I get this back:

sdfsdf.png