Wro module - files processed question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Wro module - files processed question

Jose Garcia
Hi

Does anybody know why wro module seem processing files outside of the web-uimodule? Otherwise can be removed?


Let me explain my case. I have done a xlst formatter to display xml metadata in html page (I know there's a Groovy formatter for that, but doesn't work well as changes the metadata displayed, removing namespaces from the header and adding to the xml elements, what make it useless and trying to fix it is not really clear).

So I added the xsl formatter to my schema and copied also these files to my schema to use highlight syntax:


Now I get the following:

2019-02-20 08:48:34,168 ERROR [geonetwork.wro4j] - Error occurred during a wro4j request handling

java.lang.IllegalArgumentException: Both '/XXXXX/web/src/main/webapp/WEB-INF/data/data/formatter/xml_view/highlight-json-xml.js' and 'org.fao.geonet.wro4j.ClosureRequireDependencyManager$Node@a6612672' have the same provide id: highlight-json-xml



For sure I can check to reference the js/css from original paths in WEB-INF/data/data/formatter/xml_view, but wanted to create a schema with all required files and don't rely in external resources. 

Regards,
Jose García
--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Wro module - files processed question

Florent gravin-2
Hi,

It seems wro checks the formatter dir for css and js.
Your error is just about the file names, what is .cess ? I ddon't exactly know if we can have same name for css and js, i would say yes, but maybe just change one file name and it should be fine ?

highlight-json-xml-css.cess

Other options is to remove wro check of formatterdir.



On Wed, Feb 20, 2019 at 9:04 AM Jose Garcia <[hidden email]> wrote:
Hi

Does anybody know why wro module seem processing files outside of the web-uimodule? Otherwise can be removed?


Let me explain my case. I have done a xlst formatter to display xml metadata in html page (I know there's a Groovy formatter for that, but doesn't work well as changes the metadata displayed, removing namespaces from the header and adding to the xml elements, what make it useless and trying to fix it is not really clear).

So I added the xsl formatter to my schema and copied also these files to my schema to use highlight syntax:


Now I get the following:

2019-02-20 08:48:34,168 ERROR [geonetwork.wro4j] - Error occurred during a wro4j request handling

java.lang.IllegalArgumentException: Both '/XXXXX/web/src/main/webapp/WEB-INF/data/data/formatter/xml_view/highlight-json-xml.js' and 'org.fao.geonet.wro4j.ClosureRequireDependencyManager$Node@a6612672' have the same provide id: highlight-json-xml



For sure I can check to reference the js/css from original paths in WEB-INF/data/data/formatter/xml_view, but wanted to create a schema with all required files and don't rely in external resources. 

Regards,
Jose García
--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Florent Gravin
Front-end Technical Leader
+33 4 58 48 20 36


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Wro module - files processed question

Jose Garcia
Hi Florent

Thanks for the quick response, my colleague Juan pointed me to this code https://github.com/geonetwork/core-geonetwork/blob/master/wro4j/src/main/java/org/fao/geonet/wro4j/ClosureRequireDependencyManager.java#L179-L187, that seem uses the file name as resource id if no goog.provide is found (instead of full path), what avoids having files with duplicated names.

Not really sure the reason to scan the schemas/formatter folders, but for now I managed to remove the files from the schema and just point to the global ones. Not optimal if the global files are removed in the future, but probably it's unlikely and for now works fine.
Regards,
Jose García

On Wed, Feb 20, 2019 at 9:33 AM Florent Gravin <[hidden email]> wrote:
Hi,

It seems wro checks the formatter dir for css and js.
Your error is just about the file names, what is .cess ? I ddon't exactly know if we can have same name for css and js, i would say yes, but maybe just change one file name and it should be fine ?

highlight-json-xml-css.cess

Other options is to remove wro check of formatterdir.



On Wed, Feb 20, 2019 at 9:04 AM Jose Garcia <[hidden email]> wrote:
Hi

Does anybody know why wro module seem processing files outside of the web-uimodule? Otherwise can be removed?


Let me explain my case. I have done a xlst formatter to display xml metadata in html page (I know there's a Groovy formatter for that, but doesn't work well as changes the metadata displayed, removing namespaces from the header and adding to the xml elements, what make it useless and trying to fix it is not really clear).

So I added the xsl formatter to my schema and copied also these files to my schema to use highlight syntax:


Now I get the following:

2019-02-20 08:48:34,168 ERROR [geonetwork.wro4j] - Error occurred during a wro4j request handling

java.lang.IllegalArgumentException: Both '/XXXXX/web/src/main/webapp/WEB-INF/data/data/formatter/xml_view/highlight-json-xml.js' and 'org.fao.geonet.wro4j.ClosureRequireDependencyManager$Node@a6612672' have the same provide id: highlight-json-xml



For sure I can check to reference the js/css from original paths in WEB-INF/data/data/formatter/xml_view, but wanted to create a schema with all required files and don't rely in external resources. 

Regards,
Jose García
--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Florent Gravin
Front-end Technical Leader
+33 4 58 48 20 36


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

  

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork