struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Paul <owtstu...@muha.net>
Subject Struts Dojo Plugin is broken (2.3.16.3)
Date Wed, 28 May 2014 11:27:48 GMT
Hi!
If anyone else have issues with latest Struts Dojo, here's something for
you;


The error in question can be seen when the javascript error console
yells: "TypeError: "$Rev$".match(...) is null"

This happens because the current available Struts built from Git and not
Subversion.
When checking out from Subversion, it appends the revision number to all
instances of "$Rev$" in the files.
Git does not do keyword substitution.

This is the offending line;
 
https://github.com/apache/struts/blob/develop/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js#L36

It looks like this when checked out from Subversion;

  dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev:
670371 $".match(/[0-9]+/)[0]),toString:function(){

Now unfortunately it looks like this in the latest jar;

 
dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev$".match(/[0-9]+/)[0]),toString:function(){

So the .match() fails and kills Dojo.


Regards
AP.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message