Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long Unicode strings entered in user's profile (eg. address1 and address2 fields) are stored truncated and unreadable #4974

Closed
yasserghk opened this issue Nov 2, 2014 · 11 comments

Comments

@yasserghk
Copy link

Steps to reproduce the issue

create/modify user profile and input a string of more than 42 unicode (I tested using persian) characters in text box "address 1" or "address 2".

sample input string: کمسیهبتدرسیهشمسینمکب ثصقضمسبجشیسمه تبیسضصثقفم

Expected result

A string same as inputted one or at least a readable truncated string.

Actual result

A truncated unreadable string of 255 characters.
in this example(including initial double quotation mark):
"\u0634\u0633\u06cc\u0628\u0636\u0635\u062b\u0642\u06a9\u0646\u0645\u062a\u0627\u0644\u0641\u063a\u0639\u0647\u062e\u062d\u0646\u0639\u062e\u0647\u0639\u063a\u0641\u0642\u062b\u0635\u062a\u0636\u0634\u0633\u06cc\u0628\u0644\u0627\u062a\u0646\u0645\u0626\u

System information (as much as possible)

Joomla version: 2.5.27
Browser: Google Chrome Version 38.0.2125.111 m
Web server: Apachie v2.2.27 and 2.2.22
DBMS: mySQL v5.5.24 and 5.5.37-cll
PHP version: 5.3.28 and 5.4.3
Database/tables/fields collation: utf8_general_ci

Additional comments

Same result in Front-end or Back-end
But saving test input string via phpMyAdmin (browse -> edit) did not result in such problem.

It would be admirable if front-end limits the input strings' length to their limited extents.

@infograf768
Copy link
Member

Unrelated to language imho

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4974.

@infograf768
Copy link
Member

And I cannot repoduce the issue here:

screen shot 2014-11-03 at 06 08 25

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4974.

@infograf768
Copy link
Member

Sorry. I confirm the issue on 2.5, not in 3.3.6+

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4974.

@infograf768
Copy link
Member

The issue is in the # of characters in the _user_profile table for the value

`profile_value  varchar(255)`

@yasserghk
Copy link
Author

Dear infograf768,
Thanks for your attention. :D
Here is the first place I posted this problem, I guess it will take a long time for an official solution to appear.
Do you think if there is an alternative way/place to search for a quick workaround?
Thanks again.

@yasserghk yasserghk reopened this Nov 3, 2014
@Bakual
Copy link
Contributor

Bakual commented Nov 3, 2014

Do you think if there is an alternative way/place to search for a quick workaround?

The simplest thing would be to change your database field so it is able to store longer values.

@yasserghk
Copy link
Author

Thanks Bakual.
I changed type of the field 'profile_value' in table '_user_profiles', from varchar(255) into 'TEXT' as it is in J3.3.6. and the problem solved for now. 👍
Nonetheless, I'm worried about future updates of Joomla 2.5.x if it will change back data type into varchar(255).
So, I already tested and found this changing back will result in losing my data stored in this field, for sure. :-(
I think it's time for me to migrate all of my 10 Joomla websites to 3.3.x asap.

@Bakual
Copy link
Contributor

Bakual commented Nov 3, 2014

Nonetheless, I'm worried about future updates of Joomla 2.5.x if it will change back data type into varchar(255).

Since Joomla 2.5 will be end of life this year, there is only one release left scheduled. I doubt we will change that field back to varchar. If anything we would change it to text lîke in J3 :)

However I strongly support you in upgrading to J3 👍

@infograf768
Copy link
Member

@Bakual

Can't we add an update to the db in next 2.5 update?

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4974.

@Bakual
Copy link
Contributor

Bakual commented Nov 4, 2014

I don't see why we can't. If someone writes a PR 😄

infograf768 added a commit to infograf768/joomla-cms that referenced this issue Nov 4, 2014
@infograf768
Copy link
Member

Please test PR here:
#4984

infograf768 added a commit that referenced this issue Nov 4, 2014
Issue with Long Unicode strings entered in user's profile #4974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants