I am converting a legacy app (that has been running under ACF10 - Fusebox
4) to Lucee.
One of the very first errors I received was regarding this bit of code:--------------------
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;
return s;
}
It would throw an error on the line:
s.url = serialize(url) & “&br=1”;
and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String from
Struct
So - I edited this function to:
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;
return s;
}
And that seemed to fix the issue for THAT error.
But - as all the fuseactions/fusearguments are passed in the URL - I am
finding more and more of these “Use Built-in Function…” errors that all
have some relation to the URL.
Has anyone else seen this issue with older FuseBox applications running
under Lucee?
I can post other code examples - if that would help…
I’m surprised that works in CF10, if url is indeed a struct that is being
passed into that function. Logically, string concatenation shouldn’t work
with a struct, but maybe ACF coerces it some way.
If it is a string, then I’d suggest changing the url argument to another
name so Lucee doesn’t treat it as the url scope.
Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamediaOn Sat, Feb 27, 2016 at 7:42 PM, Sid Wing <@Sid_Wing> wrote:
I am converting a legacy app (that has been running under ACF10 - Fusebox
4) to Lucee.
One of the very first errors I received was regarding this bit of code:
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;
return s;
}
It would throw an error on the line:
s.url = serialize(url) & “&br=1”;
and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String from
Struct
So - I edited this function to:
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;
return s;
}
And that seemed to fix the issue for THAT error.
But - as all the fuseactions/fusearguments are passed in the URL - I am
finding more and more of these “Use Built-in Function…” errors that all
have some relation to the URL.
Has anyone else seen this issue with older FuseBox applications running
under Lucee?
I can post other code examples - if that would help…
I am converting a legacy app (that has been running under ACF10 -
Fusebox 4) to Lucee.
One of the very first errors I received was regarding this bit of code:
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = url & “&br=1”;
s.tooltip = tooltip;
return s;
}
It would throw an error on the line:
s.url = serialize(url) & “&br=1”;
and the error it would throw is:
Use Built-In-Function “serialize(Struct):String” to create a String
from Struct
So - I edited this function to:
function br_link(fuseaction, title, url, tooltip)
{
var s = StructNew();
s.fuseaction = fuseaction;
s.title = title;
s.url = serialize(url) & “&br=1”;
s.tooltip = tooltip;
return s;
}
And that seemed to fix the issue for THAT error.
But - as all the fuseactions/fusearguments are passed in the URL - I
am finding more and more of these “Use Built-in Function…” errors
that all have some relation to the URL.
Has anyone else seen this issue with older FuseBox applications
running under Lucee?
I can post other code examples - if that would help…
–
Love Lucee? Become a supporter and be part of the Lucee project today!