组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Liferay 6.1 document download when document title has special characters Kimmo Makinen 2012年5月21日 上午4:41
RE: Liferay 6.1 document download when document title has special character Hitoshi Ozawa 2012年5月21日 上午4:52
RE: Liferay 6.1 document download when document title has special character Kimmo Makinen 2012年5月21日 上午5:37
RE: Liferay 6.1 document download when document title has special character Hitoshi Ozawa 2012年5月21日 下午2:41
RE: Liferay 6.1 document download when document title has special character Kimmo Makinen 2012年5月21日 下午11:27
RE: Liferay 6.1 document download when document title has special character Hitoshi Ozawa 2012年5月22日 上午3:46
RE: Liferay 6.1 document download when document title has special character Alexander Chow 2012年5月21日 下午12:55
RE: Liferay 6.1 document download when document title has special character Kimmo Makinen 2012年5月22日 上午4:32
RE: Liferay 6.1 document download when document title has special character Alexander Chow 2012年5月22日 上午4:37
RE: Liferay 6.1 document download when document title has special character Kimmo Makinen 2012年5月22日 上午5:43
RE: Liferay 6.1 document download when document title has special character Alexander Chow 2012年5月22日 上午11:03
RE: Liferay 6.1 document download when document title has special character Kimmo Makinen 2012年5月22日 下午10:14
RE: Liferay 6.1 document download when document title has special character Hitoshi Ozawa 2012年5月22日 下午10:42
RE: Liferay 6.1 document download when document title has special character Hitoshi Ozawa 2012年5月23日 下午2:24
Kimmo Makinen
Liferay 6.1 document download when document title has special characters
2012年5月21日 上午4:41
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Liferay 6.1 with JBoss 7.0.2 (the bundle) installation.

In the "Documents and Media Display" portlet I can upload a document. But when uploading if I give the uploaded media file a title that includes special characters (in my case for example a standard Finnish language UTF-8 character "LATIN SMALL LETTER A WITH DIAERESIS", "a with umlauts"), the file can no longer be downloaded resulting in a "com.liferay.portlet.documentlibrary.NoSuchFileEntryException" exception. Happens also when changing the title of a properly working media item to one that contains UTF-8 characters.

Liferay database is UTF-8 encoded and the item title is just fine in the database. The bundled JBoss is in UTF-8 and the linux platform is also defaulting to a UTF-8 locale. Tried with several browsers (FF12, IE8, Chrome18).

Is this a Liferay restriction and if not, how can it be circumvented?
Hitoshi Ozawa
RE: Liferay 6.1 document download when document title has special character
2012年5月21日 上午4:52
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

Yes, this is a know problem. Wondering if you can make it work using WebDAV or having problem with that too like I am.
Kimmo Makinen
RE: Liferay 6.1 document download when document title has special character
2012年5月21日 上午5:37
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Thank you for your answer. We do not use WebDAV.
Unfortunately this is a show-stopper for our user-base.

Do you happen to know if there is an open ticket for this in the issue tracking system as I was not able to locate one?
Alexander Chow
RE: Liferay 6.1 document download when document title has special character
2012年5月21日 下午12:55
答复

Alexander Chow

LIFERAY STAFF

等级: Liferay Master

帖子: 519

加入日期: 2005年7月19日

最近的帖子

Hi Kimmo, I just did a quick test with a file named "kieltä.pdf" on Tomcat-Liferay 6.1 GA as well as the latest GIT master but couldn't duplicate this.

Hitoshi, is there a ticket for this already? Or how is it a known problem?
Hitoshi Ozawa
RE: Liferay 6.1 document download when document title has special character
2012年5月21日 下午2:41
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

Sorry, but I just fixing these kinds of problems in my own version. Tried to get liferay to fix it and didn't get very far - they keep telling me they can't reproduce it. Don't have too much time to waste because I'm on a tight schedule.
Kimmo Makinen
RE: Liferay 6.1 document download when document title has special character
2012年5月21日 下午11:27
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Liferay version used: Liferay Portal Community Edition 6.1.0 CE (bundle with JBoss AS 7.0.2).

Attached are two screenshots.
First screenshot is of a singular uploaded document. I now changed the document's title to "Testing with Ä" as seen:

Second screenshot is what happens if I now select the download option from the actions-button on the right of the document row.

This is a local installation using Windows 7 and the default internal database. It also happens on a linux server using Oracle database.
Should I now change the title of the uploaded file to something that contains ASCII characters only, no problem occurs downloading.
附件

附件

附件: webmarela-liferay-1.jpg (149.8k), webmarela-liferay-2.jpg (126.8k)
Hitoshi Ozawa
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 上午3:46
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

Should I now change the title of the uploaded file to something that contains ASCII characters only, no problem occurs downloading.


Some of our earlier sites are using similar technique of replacing non-ASCII string with ASCII string.
Kimmo Makinen
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 上午4:32
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Alexander, yes there's no problem UPLOADING files that contain special characters. But if you change the TITLE of the uploaded document so that it contains special characters, problems start. For example, Liferay automatically generates a thumbnail for uploaded image files. If you change the TITLE (to include special characters) of an uploaded image file, even the thumbnail breaks and it can no longer be downloaded.
Alexander Chow
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 上午4:37
答复

Alexander Chow

LIFERAY STAFF

等级: Liferay Master

帖子: 519

加入日期: 2005年7月19日

最近的帖子

Hi Kimmo,

No, I understood what you were saying. After a little more testing this morning, it seems as though this is might be a JBoss problem. I am able to now duplicate it on JBoss but NOT on Tomcat. Doing a little debugging now…

Alex
Kimmo Makinen
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 上午5:43
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Ok. Thanks for looking deeper.
Alexander Chow
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 上午11:03
答复

Alexander Chow

LIFERAY STAFF

等级: Liferay Master

帖子: 519

加入日期: 2005年7月19日

最近的帖子

Hey Kimmo,

So it turns out that JBoss AS 7.0.2 (the bundle you were using) by default decodes the request.getPathInfo() with ISO-8859-1. Moreover, you are unable to configure the URL encoding of JBoss Web to UTF-8. This, of course, is a major problem.

In JBoss AS 7.1.x, RedHat added the necessary support (see AS7-1917). So, you need to upgrade to JBoss AS 7.1.x (you can see what we do in the GITHub changes to LPS-27173) and insert in your standalone.xml, after the <extensions /> block, the following:

<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
<property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>


See this forum and this blog .

Also, FYI, I have made a patch so that when setting up with Liferay, we will try to ensure that is configured (LPS-27483).


Alex
Kimmo Makinen
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 下午10:14
答复

Kimmo Makinen

等级: New Member

帖子: 6

加入日期: 2012年5月11日

最近的帖子

Thanks for resolving the issue.
Hitoshi Ozawa
RE: Liferay 6.1 document download when document title has special character
2012年5月22日 下午10:42
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

Thank you from me too. Seems like first time technical localization issue was resolved. emoticon

BTW, about that event in Japan Mr. Endo was planning next month, talked with the vice-president of a company in Japan and he hasn't heard too much about it yet and the time schedule seems to be too short now to do it. I'll try to plan something a little bit further down because I'm ready technically now into move into the business side now. emoticon
Hitoshi Ozawa
RE: Liferay 6.1 document download when document title has special character
2012年5月23日 下午2:24
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 8000

加入日期: 2010年3月23日

最近的帖子

BTW, forgot to mention that we are one of the largest JBoss user in Japan. Redhat Japan uses us as reference.
I've seen Amos in the JBoss forum so I thought he'll be taking care of it.

Moving forward. :-)