Does anyone have cftag2cfscript working on Lucee (or Railo)

Due to my inherent laziness… I wanted to automate (the bulk) of tag to
script conversion… this tool seems to fit the bill, but errors:

/cftag2cfscript/cftag2cfxml.cfc: line 55
Invalid Identifier, the following character cannot be part of a identifier
[(]

The repo states it only supports ACF…

Interesting to note that the error on line 55 is a comment…

Anyway, has anyone managed to use this tool outside of ACF?

Regards,
Adam

Hey Adam,

I spent some time on this issue tonight and unfortunately I think this is
out of my hands: Lucee and Railo both attempt to interpret the commented
string as a cftag!

As you said, the error is thrown on a comment. My first idea was to delete
the comment, but that just made the error happen again in another place.
This time it was on working code, so I had to start digging…

The line:
//str = rereplace(str,’<cfdirectory(.*?)>’,’<cfdirectory \1 />’,‘all’);
The error:
Invalid Identifier, the following character cannot be part of a identifier
[(]

If I remove the “(.*?)” from the regex I get a new error:

The line:
//str = rereplace(str,’’,’<cfdirectory \1 />’,‘all’);
The error:
attribute directory is required for tag cfdirectory

Since the file is entirely made of regex that replaces cftags with cfscript
I don’t think this is going to work until Lucee & Railo understand that
we’re looking at strings and not tags.

A possible work around would be to take the regex and rewrite
cftag2cfscript in a different language. …maybe someone has a cf to ???
script?! X’DOn Wednesday, May 13, 2015 at 7:54:39 PM UTC-4, Adam Chapman wrote:

Due to my inherent laziness… I wanted to automate (the bulk) of tag to
script conversion… this tool seems to fit the bill, but errors:

/cftag2cfscript/cftag2cfxml.cfc: line 55
Invalid Identifier, the following character cannot be part of a identifier
[(]

https://github.com/pirategaspard/cftag2cfscript/blob/master/cftag2cfxml.cfc#L55

The repo states it only supports ACF…

Interesting to note that the error on line 55 is a comment…

Anyway, has anyone managed to use this tool outside of ACF?

Regards,
Adam

btw I tested this on Lucee 4.5.1 & Railo 4.2.1.008On Wednesday, May 13, 2015 at 10:11:28 PM UTC-4, Daniel Gaspar wrote:

Hey Adam,

I spent some time on this issue tonight and unfortunately I think this is
out of my hands: Lucee and Railo both attempt to interpret the commented
string as a cftag!

As you said, the error is thrown on a comment. My first idea was to delete
the comment, but that just made the error happen again in another place.
This time it was on working code, so I had to start digging…

The line:
//str = rereplace(str,’<cfdirectory(.*?)>’,’<cfdirectory \1 />’,‘all’);
The error:
Invalid Identifier, the following character cannot be part of a
identifier [(]

If I remove the “(.*?)” from the regex I get a new error:

The line:
//str = rereplace(str,’’,’<cfdirectory \1 />’,‘all’);
The error:
attribute directory is required for tag cfdirectory

Since the file is entirely made of regex that replaces cftags with
cfscript I don’t think this is going to work until Lucee & Railo understand
that we’re looking at strings and not tags.

A possible work around would be to take the regex and rewrite
cftag2cfscript in a different language. …maybe someone has a cf to ???
script?! X’D

On Wednesday, May 13, 2015 at 7:54:39 PM UTC-4, Adam Chapman wrote:

Due to my inherent laziness… I wanted to automate (the bulk) of tag to
script conversion… this tool seems to fit the bill, but errors:

/cftag2cfscript/cftag2cfxml.cfc: line 55
Invalid Identifier, the following character cannot be part of a
identifier [(]

https://github.com/pirategaspard/cftag2cfscript/blob/master/cftag2cfxml.cfc#L55

The repo states it only supports ACF…

Interesting to note that the error on line 55 is a comment…

Anyway, has anyone managed to use this tool outside of ACF?

Regards,
Adam

After some mucking around… I manages to get it working with string
concatenation on all cf* tags…

str = rereplace(str,’<c’ & ‘fsavecontent(.?)>(.?)</c’ &
‘fsavecontent>’,’<c’ & ‘fsavecontent \1 ></c’ &
‘fsavecontent>’,‘all’);

AdamOn Thursday, May 14, 2015 at 12:15:04 PM UTC+10, Daniel Gaspar wrote:

btw I tested this on Lucee 4.5.1 & Railo 4.2.1.008

On Wednesday, May 13, 2015 at 10:11:28 PM UTC-4, Daniel Gaspar wrote:

Hey Adam,

I spent some time on this issue tonight and unfortunately I think this is
out of my hands: Lucee and Railo both attempt to interpret the commented
string as a cftag!

As you said, the error is thrown on a comment. My first idea was to
delete the comment, but that just made the error happen again in another
place. This time it was on working code, so I had to start digging…

The line:
//str = rereplace(str,’<cfdirectory(.*?)>’,’<cfdirectory \1 />’,‘all’);
The error:
Invalid Identifier, the following character cannot be part of a
identifier [(]

If I remove the “(.*?)” from the regex I get a new error:

The line:
//str = rereplace(str,’’,’<cfdirectory \1 />’,‘all’);
The error:
attribute directory is required for tag cfdirectory

Since the file is entirely made of regex that replaces cftags with
cfscript I don’t think this is going to work until Lucee & Railo understand
that we’re looking at strings and not tags.

A possible work around would be to take the regex and rewrite
cftag2cfscript in a different language. …maybe someone has a cf to ???
script?! X’D

On Wednesday, May 13, 2015 at 7:54:39 PM UTC-4, Adam Chapman wrote:

Due to my inherent laziness… I wanted to automate (the bulk) of tag to
script conversion… this tool seems to fit the bill, but errors:

/cftag2cfscript/cftag2cfxml.cfc: line 55
Invalid Identifier, the following character cannot be part of a
identifier [(]

https://github.com/pirategaspard/cftag2cfscript/blob/master/cftag2cfxml.cfc#L55

The repo states it only supports ACF…

Interesting to note that the error on line 55 is a comment…

Anyway, has anyone managed to use this tool outside of ACF?

Regards,
Adam

Ha! Great idea! If you submit a pull request I’ll merge this in and then no
one else will have to figure this out. Thanks!On Wednesday, May 13, 2015 at 11:56:59 PM UTC-4, Adam Chapman wrote:

After some mucking around… I manages to get it working with string
concatenation on all cf* tags…

str = rereplace(str,’<c’ & ‘fsavecontent(.?)>(.?)</c’ &
‘fsavecontent>’,’<c’ & ‘fsavecontent \1 ></c’ &
‘fsavecontent>’,‘all’);

Adam

On Thursday, May 14, 2015 at 12:15:04 PM UTC+10, Daniel Gaspar wrote:

btw I tested this on Lucee 4.5.1 & Railo 4.2.1.008

On Wednesday, May 13, 2015 at 10:11:28 PM UTC-4, Daniel Gaspar wrote:

Hey Adam,

I spent some time on this issue tonight and unfortunately I think this
is out of my hands: Lucee and Railo both attempt to interpret the commented
string as a cftag!

As you said, the error is thrown on a comment. My first idea was to
delete the comment, but that just made the error happen again in another
place. This time it was on working code, so I had to start digging…

The line:
//str = rereplace(str,’<cfdirectory(.*?)>’,’<cfdirectory \1 />’,‘all’);
The error:
Invalid Identifier, the following character cannot be part of a
identifier [(]

If I remove the “(.*?)” from the regex I get a new error:

The line:
//str = rereplace(str,’’,’<cfdirectory \1 />’,‘all’);
The error:
attribute directory is required for tag cfdirectory

Since the file is entirely made of regex that replaces cftags with
cfscript I don’t think this is going to work until Lucee & Railo understand
that we’re looking at strings and not tags.

A possible work around would be to take the regex and rewrite
cftag2cfscript in a different language. …maybe someone has a cf to ???
script?! X’D

On Wednesday, May 13, 2015 at 7:54:39 PM UTC-4, Adam Chapman wrote:

Due to my inherent laziness… I wanted to automate (the bulk) of tag to
script conversion… this tool seems to fit the bill, but errors:

/cftag2cfscript/cftag2cfxml.cfc: line 55
Invalid Identifier, the following character cannot be part of a
identifier [(]

https://github.com/pirategaspard/cftag2cfscript/blob/master/cftag2cfxml.cfc#L55

The repo states it only supports ACF…

Interesting to note that the error on line 55 is a comment…

Anyway, has anyone managed to use this tool outside of ACF?

Regards,
Adam