|
|
| New Topic Reply Subscription Options |
|
| Forums: CFFM: Weird behavior with Rialo | |||
|
|||
| GeraldGuido
Joined: 10/18/08 Posts: 3 |
Weird behavior with Rialo Posted Saturday, October 18, 2008 at {ts '2013-05-25 20:45:00'} Hey Rick. javaRB.cfc is not loading up the msg struct for some weird reason. I thought you might be able to figure it out due to your immersion in the project. I outputted the values that should be loaded and did a dump of the struct and all looks like it should. Dump/error/values My code for dumpetc but when a msg is called directly railo complains about: even though it looks like those values are getting loaded and they are in the cfdump. Any Ideas? Great stuff BTW... folks love CFMM. |
||
|
|||
| Aegis
Joined: 10/20/08 Posts: 4 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 22:16:00'} Had the same problem Gerald, much googling showed that the issue was with how CF handles structs versus Railo. what you need to do (unfortunately) is go through the CFFM files and find all the msg and button text references and swap this.that.msg.t34 for this.that["msg.t34"] It's really painful. Sadly it looks like a lot of people have already done it, but nobody has posted updated files anywhere. I'd send you the ones we did, but we've made extensive changes to our copy to incorporate user/folder restrictions. |
||
|
|||
| GeraldGuido
Joined: 10/18/08 Posts: 3 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 22:27:00'} Np. Thanx Rick Fortunately: |
||
|
|||
| Aegis
Joined: 10/20/08 Posts: 4 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 22:47:00'} yup regex is the easiest way to fix it.. just dont forget you dont need to fix all the cffm_xxx.cfm files.. just fix cffm.cfm and save it over the top of cffm_file.cfm, cffm_image.cfm etc just asked one of our devs to paste the regex he used to sort this in here for you.. hopefully he wont be too long |
||
|
|||
| chips
Joined: 10/20/08 Posts: 2 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 23:09:00'} Hi, Didnt have time to bundle it into an executeable so heres the java code for now, nothing special and it can probably be adapted for other purposes or embedded in a CF function, all the following does is read the file in and update the structs as it goes then prints the output to screen so u will need to load your cffm pages into a text file and then copy your output back into your cffm files, i plan to adapt it to process multi files and output the results directly to file but not sure when i will get a chance.
public class Replacement { |
||
|
|||
| GeraldGuido
Joined: 10/18/08 Posts: 3 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 23:13:00'} Aegis wrote: just asked one of our devs to paste the regex he used to sort this in here for you.. hopefully he wont be too long
|
||
|
|||
| chips
Joined: 10/20/08 Posts: 2 |
RE: Weird behavior with Rialo Posted Monday, October 20, 2008 at {ts '2013-05-25 23:35:00'} Oh nearly forgot, the above will possible break your filepaths in the files *I think, cant be sure if it was this one or not, but either way its only 1 or 2 lines per file that you would have to fix if it was an issue. In other words, use at your own risk and dont blame me if it breaks |
||
|
|||
| gertfranz
Joined: 11/17/08 Posts: 1 |
RE: Weird behavior with Rialo Posted Monday, November 17, 2008 at {ts '2013-05-25 07:49:00'} Gerald, this is an issue we are long aware of. And we will NOT fix it. Here are the reasons: Now somewhere later in the code you do something like this: <cfoutput>#a.b.c.d.e.f#</cfoutput> Railo will throw an error CF8 not. Here's why: So only the bold if case get's involved. And the term #a.b.c.d.e.f# is misleading as well. It suggerates that a contains a key b that contains a key c etc. Which is not the case. a contains a key b and b contains a key c named "c.d.e.f". Respecting the above we did not implement this implicit searching for struct keys since it is very slow and would only affect less than .1% of all the structs and in addition is misleading. In the case of cffm Rick is defining the keys in the resources cffm.properties file like this: msg.t1, msg.t2 etc. So they are read in JavaRB as keys and when addressed like this: cffm.resourceKit.errorMsg.t11 Railo throws an error. What I did in order to solve the problem is, that I added a small function to cffm: <cffunction name="dotNotation2Struct" output="No" returntype="struct">
This converted the dotted keys into inner structs. Then CFFM ran flawlessly and even understands Railo resources like FTP or Amazon S3. Greetings from Switzerland Join our Mailing List |
||
|
|||
| New Topic Reply Subscription Options |
|
| Subscription Options |
| Subscription options are available after you log in. |
There are 18 active user sessions right now.