掲示板

Image not exported when embedded in CKEditor

8年前 に Guillaume Kuhmel によって更新されました。

Image not exported when embedded in CKEditor

New Member 投稿: 6 参加年月日: 15/04/15 最新の投稿
Hi,

I have a problem on LIferay 6.2. GA3: i want to export a journalArticle to put it on another site.
My journalArticle has an image embedded in a CKEditor, with the "Browse server" functionnality.

When i export then import this article, the title and text is OK, but the image is missing.

Is that a bug ?

Best regards,
thumbnail
8年前 に Denis Signoretto によって更新されました。

RE: Image not exported when embedded in CKEditor

Expert 投稿: 375 参加年月日: 09/04/21 最新の投稿
Hi Guillaume,

if you just exported the web contents (by Control Panel > Web Content > Export) related Document & Media are not included in the lar export file.
If you want you can export Document & Media files too or just use Export functionality form Control Panel > Site Pages > Export so you can have a wide selection of what you need to export/import.

HTH

Regards,
Denis.
8年前 に Guillaume Kuhmel によって更新されました。

RE: Image not exported when embedded in CKEditor

New Member 投稿: 6 参加年月日: 15/04/15 最新の投稿
Hi Denis,

Thanks for your answer.
The fact is that the image is contained not in a site, but in a user's document and media library. (when i click "browse on server", il select the folder with the user's screename, then upload an image).

I did a full export of the website but when doing that, the users's personal documents and media library is NOT exported (it should be).
So the links are broken.

I created a LPS for that : https://issues.liferay.com/browse/LPS-56657
thumbnail
8年前 に Jorge Díaz によって更新されました。

RE: Image not exported when embedded in CKEditor

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
Guillaume Kuhmel:

The fact is that the image is contained not in a site, but in a user's document and media library. (when i click "browse on server", il select the folder with the user's screename, then upload an image).

I did a full export of the website but when doing that, the users's personal documents and media library is NOT exported (it should be).


If the webcontent is contained in a different site than document of media library, the export procedure is working as expected.

LAR export only works in one specified site, it will never export objects outside that site.
To avoid broken links, exported LAR will have "missing references" that will be validated at import time.

So in your case, you have to execute two export one for the document at document library and another one for webcontents.

About your LPS-56657, please add detailed information about image is contained outside the site.
8年前 に Guillaume Kuhmel によって更新されました。

RE: Image not exported when embedded in CKEditor

New Member 投稿: 6 参加年月日: 15/04/15 最新の投稿
Thanks.

So, let's say i have 2000 users contributing on a website, using their own document and media library for working.
When exporting or publishing the site, all the images links they put in the webcontent are lost.
So, if i understand what you say, it means that i have to export each user document library by hand and import then one by one in the target site ?
With lot of users and lot of content, it's just impossible.
I think it's a big lack in liferay functionnality, don't you think ?

Moreover, i've imported the LAR of the site, but no "missing references" were displayed, where do they should be ? I could not see and validate them
I've constated the issue when navigating the site and see no images.

I speak about images added in CKEditor, not images added to a webcontent with a "File" fied.
thumbnail
8年前 に Jorge Díaz によって更新されました。

RE: Image not exported when embedded in CKEditor

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
Hi Guillaume,

I have done a quick test, and it is true that in this case the "missing references" are not added to LAR info, those links to documents outside current site are not processed, they seems to be ignored.
Only links to documents inside same site are processed and exported.

First of all, you should rewrite or add a comment at your LPS-56657 and specify that the issue is only produced when linked document/image is in a external site.

About the solution of this issue, in order to have a consistent behavior with all LAR functionality, I think we cannot add those documents from outside the site, we only can add a "missing reference" to avoid broken link after publish operation. Nevertheless this behavour will be defined by LAR/Staging team.
thumbnail
8年前 に Jorge Díaz によって更新されました。

RE: Image not exported when embedded in CKEditor

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
I have done some additional check and I can confirm you that this limitation has been solved for a future version of Liferay, at following tickets: LPS-44231 and LPS-44232

The solution to this CKEditor problem for future Liferay 7.0 is to create "missing references" so at import time LAR cannot be imported until you add the related missing images.

At 6.2 I think your best option is to have all images and documents at same Site than webcontent is.

The other alternatives you have is to implement a modification of LAR export process in order to have your wanted behaviour.
All this functionality is done here: ExportImportHelperImpl.replaceExportDLReferences
8年前 に Guillaume Kuhmel によって更新されました。

RE: Image not exported when embedded in CKEditor

New Member 投稿: 6 参加年月日: 15/04/15 最新の投稿
Jorge,

Thanks for the follow up of the subject.
I understand the complexity behind and why you'd rather add missing reference instead of importing files from other sites.
I think i'll choose a quick and dirty solution, by updating the content in journalarticle table and replacing groupId and folderIds in the "src" attribute of the images.