掲示板
Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
7年前 に Damien Guillermet によって更新されました。
Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Junior Member 投稿: 44 参加年月日: 15/07/09 最新の投稿
Hello,
I have included the Vis.js library in a Liferay Faces portlet like outputscript resource example (except that I loaded the vis.min.js file via <header-portlet-javascript> tag in liferay-portlet.xml). Since I upgraded from Liferay 6.2.4 GA6 to 7.0 GA3 I'm not able to use it anymore: a JS error is raised in web browser console (vis is not defined) although the script seems to be loaded.
The Vis.js script is compatible with ES6 module system. I'm not sure if this matter concerns Liferay Faces or how Liferay 7 manages JS resources.
I can provide a sample to reproduce if it's necessary (implementing a vis.js basic usage).
Best regards,
Damien.
I have included the Vis.js library in a Liferay Faces portlet like outputscript resource example (except that I loaded the vis.min.js file via <header-portlet-javascript> tag in liferay-portlet.xml). Since I upgraded from Liferay 6.2.4 GA6 to 7.0 GA3 I'm not able to use it anymore: a JS error is raised in web browser console (vis is not defined) although the script seems to be loaded.
The Vis.js script is compatible with ES6 module system. I'm not sure if this matter concerns Liferay Faces or how Liferay 7 manages JS resources.
I can provide a sample to reproduce if it's necessary (implementing a vis.js basic usage).
Best regards,
Damien.
7年前 に Juan Gonzalez によって更新されました。
RE: Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Hi Damien.
You're basically reproducing a known problems with amd-loader and js files that aren't ready for that.
Please read here: https://web.liferay.com/community/forums/-/message_boards/message/81981433 to know about the possible solution. Create two js files, one to be included before disabling amd loader, then other one for enabling it after your included js file.
More info: http://stackoverflow.com/questions/34269886/amd-loader-disable-enable-in-theme
You're basically reproducing a known problems with amd-loader and js files that aren't ready for that.
Please read here: https://web.liferay.com/community/forums/-/message_boards/message/81981433 to know about the possible solution. Create two js files, one to be included before disabling amd loader, then other one for enabling it after your included js file.
More info: http://stackoverflow.com/questions/34269886/amd-loader-disable-enable-in-theme
7年前 に Damien Guillermet によって更新されました。
RE: Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Junior Member 投稿: 44 参加年月日: 15/07/09 最新の投稿
Hello Juan and thank you again I'll read that ;)
Sorry for posting this subject in Liferay Faces forum it was not the appropriate location!
EDIT: I followed you advice and it works like a charm.
Sorry for posting this subject in Liferay Faces forum it was not the appropriate location!
EDIT: I followed you advice and it works like a charm.
7年前 に Chema Balsas によって更新されました。
RE: Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Regular Member 投稿: 127 参加年月日: 13/02/25 最新の投稿
Hey Damien, just FYI, we've worked on https://issues.liferay.com/browse/LPS-68298 to allow hiding the loader behind a namespace with just a simple system setting.
Once this is merged and gets to your liferay distribution, you should be able to simply configure the loader to be hidden and get rid of the workaround.
Hope that helps!
Once this is merged and gets to your liferay distribution, you should be able to simply configure the loader to be hidden and get rid of the workaround.
Hope that helps!
7年前 に Damien Guillermet によって更新されました。
RE: Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Junior Member 投稿: 44 参加年月日: 15/07/09 最新の投稿
Hello Chema,
yes i read that issue thank you for your great work
I'm impatient to use it in the next Liferay release!
Damien.
yes i read that issue thank you for your great work
I'm impatient to use it in the next Liferay release!
Damien.
7年前 に Chema Balsas によって更新されました。
RE: Trouble with included vis.js library - ES6 script - Liferay 7.0 GA3
Regular Member 投稿: 127 参加年月日: 13/02/25 最新の投稿
Thanks a lot for the kind words and understanding, Damien, and sorry about the current inconveniences this is causing you.
The code for this is finalized and backported, so it shouldn't be long now until it ends up in a FixPack
Please, let us know if you still have some other issues with this!
The code for this is finalized and backported, so it shouldn't be long now until it ends up in a FixPack
Please, let us know if you still have some other issues with this!