Have until Monday to sort this else the company wi...
# lucee
m
Have until Monday to sort this else the company will abandon the Lucee migration so any help will be greatly appreciated
p
What is your end goal here, just to verify that specific tags you are using exist in Lucee?
or to confirm that a custom tag you have exists?
m
@Patrick yes to essentially get custom tags working that were working with the cf version. From the screenshot you can see there’s one specific one there with an underscore cf_index that’s seems to be the tag Lucee isn’t recognising or calling. I’ve traced this to a point in the code where a cfmodule is called which seems to include that index file.
The screenshot shows the differences . As you can see some tags not being called by Lucee but the code base is exactly the same.
p
And
cf_index
is a custom tag, NOT related to the actual cfindex?
m
Because of this it affects how the code is being processed.
This is the weird thing I can’t see anything in the code base custom tags that is named cf_index . It’s using fusebox 4 framework so not sure if it’s something untoward with that and Lucee. Easier to explain via screenshare ideally as not to sure if I’m doing to well explains it
p
you can DM me a meeting link and I can chat for 5min
Also btw, Fusebox 4; wow talk about Legacy. Maybe bigger changes need to occur.
m
That’s so very kind of you thanks Patrick. I’m currently away from home today at the moment. Are you available tomorrow or Monday perhaps?
I’m not at home at mo
p
Sorry wont be available; I just had some spare time this morning.
m
Ah bugger ok Patrick no problem thanks for the offer though 🙏 🙏
g
Please forgive me if you already know this; A custom tag is NOT part of ACF or Lucee. It is a piece of code you write. Before there was CFSCRIPT, CFML only had TAGS. So if you wanted a reusable "script" / function - you created a Custom Tag. So for any of the engines to "see" your "Custom" tag - you need to tell it where it is. "Normally" - you store all your custom tags, together in the same folder. Then, you tell the engine that you're using - via the engine's Administrator, where all your custom tags live. For Lucee it is Archives and Resources (See my screenshot) The fact that you're saying your app is not finding the code - makes it sound like a config issue of some sort - as opposed to some sort of "engine" difference between Adobe CF and Lucee. If it were an engine difference - it would be some other "exception"... ALSO: Is this on the SAME server? Have you changed the Engine on the same server? Or do you have a second server - with Lucee and your web application copied to that? Because if you have two separate servers - perhaps you have missing files? As for Fusebox - There could be a few issues affecting it from working correctly, too. I would start with a few basic checks: • Double-checking all the mappings that you have defined in the ACF "Administrator" and ensure that you have the same mappings defined in your Lucee admin. • Make sure the Lucee service has access to it. (Check your file / folder permissions ◦ As a "definitive" test give "everyone" full-rights to everything, recursuvely in your "webApp" directory and restest. ▪︎ If it now works - you have a "permissions" issue to find / fix. ▪︎ If it still doesn't work - leave the permissions "open" and do the following steps • (Make them more secure at the VERY end - when you have it working properly) ◦ Create a really simple customTag - that shows the current time - in the custom tag directory ▪︎ (ask if you don't know) ◦ Call it from a "test" CFM page - and make sure it runs / displays the time correctly. ◦ This will confirm you have the "mappings" setup correctly. • Double check the configuration of Fusebox ◦ Ensure ALL paths are correct in the FB config files. ▪︎ Perhaps you have "full" paths coded? ▪︎ Change them to "relative" paths - to make your code more "reliable". • Eg. ◦ Change "c:\inetpub\wwwroot\customTags" ◦ To "/customTags" ◦ (You might need to change this to "../customTags" - or similar. Experiment - until you get your TEST custom tag working.) Lastly - something I just thought of... Are you using Application.cfc or cfm? (and also go into whicvhever one you are using - and double check any file/folder paths - in their, too.)
Lucee Admin Screenshot
For the custom tag path in my test app... Notice that the path is "/cfmapping/...." "cfmapping" is a folder IN my web apps' root - in my example. But it doesn't have to be in the folder of my applicatrion. (which is why I am saying to check the configuration of everything in the Adobe version and doublecheck it against what you have in the Lucee version.) For the examples I have written in this thread I have the following paths (Windows) "c:\inetpub\wwwroot\myTestApp" "c:\inetpub\wwwroot\myTestApp\cfmapping" "c:\inetpub\wwwroot\myTestApp\cfmapping\customTags" "c:\inetpub\wwwroot\myTestApp\cfmapping\fusebox" "c:\inetpub\wwwroot\myTestApp\cfmapping\someCustomPath" "c:\inetpub\wwwroot\myTestApp\cfmapping\someOtherCustomPath" Again realise - this is just my example. For your original / ACF version your customTags "folder" might not even be in "c:\inetpub\wwwroot" They COULD be in "D:\" some where or "C:\SomeRandomPath_that_is_Not_A_Child_of_INETPUB"
m
@gavinbaumanis thanks ever so much for all your help and advice. I will go through this and check and will let you know. This is fabulous!!
g
@mauzer Gotten any further?
m
@gavinbaumanis hey there just starting to look at this this morning :-')
one question what would the the path to your example /cfmapping/.. ie is it something like this c:\coldfusion2018\my custom tags
and notice in my example I have the full path and the backslashes so just trying to ascertain if my mapping is incorrect
"cfmapping" is a folder IN my web apps' root - is this the Lucee Web app root?
sorry for the dumb questions just want to be clear in my haed
g
Assume you have a domain setup for your applicatrion myApplication.mycompany.com And on the webserver (probably IIS on windows maps that URL to a location on the server... Probably something like
c:\inetpub\wwwroot\myApplication
on a Windows machine. so
c:\inetpub\wwwroot\myApplication
is the root (the starting point / the landing page location) for your web application.
m
super @gavinbaumanis this is great thanks so much.
g
Also you might be confused a little about "mappings"... "I" have a Parent folder that I stick all my "external" dependencies in. and "I" call it "cfmapping" and "I" have my cfmapping folder IN my web application.
c:\inetpub\wwwroot\myApplication\cfmapping
BUT it can be anywhere you want it to be. I put it IN the application - so everything the application needs - is all IN the same folder So - you have fusebox. it is a CFML library that you didn't write - but your application needs it to run. So "I" would have
c:\inetpub\wwwroot\myApplication\cfmapping\fusebox
MY code knows how to use fusebox because I have a mapping to it. IIS calls it a VIRTUAL DIRECTORY. so if there was a page I wanted to call from my code that was in the fusebox folder - I get access to it - by a "relative" path. Lets say I want a simple "link" to something in fusebox I would write <a href="/fusebox/myLink.htm">my link</a> I haven't even mentioned the CFMAPPING folder. I haven;t mentioned the "servers" "c drive" or the path it lives on - just "/fusebox" Because in the Lucee Administrator, I created a Mapping c:\inetpub\wwwroot\myApplication\cfmapping\fusebox -> \fusebox I could still use a relative path "/fusebox/xxxx/cfm" And physically place the fusebox folder on D drive.. As long as the MAPPING in Lucee Adminstrator - points the REAL / PHYSICAL location of the folder to "/fusebox"
you do NOT have an IIS virtuial directory AND a Lucee mapping - for the same folder
a Lucee Mapping is JUST for the CFML server only. Outside of a running CFML application a LUCEE mapping is "hidden" from a normal request. If I had madse an IIS virtual Folder mapping for fusebox - the "/fusebox" path would be available to the whole web server.
m
lots of useful information. Can't thank you enough @gavinbaumanis 🙏. I can go through this and give it a go of course. Just wondered though if you would have time and be willing to do a screenshare to guide me through it. No obligation of course but thought it may be quicker that way. 🙂
I'll read through and give ita try first guess 🙂
g
In your Adobe Application - dump the fusebox struct. And in exactly the same file at the same place in the Lucee App - dump it there too. And let us know if there are any differences at all between them. Put aside everything you think might have been the problem at the beginning - and start again.
🙏 1
As an extra : You can also install commandBox from Ortus Solutions. It is open source and free and has no "quirky" licensing issues. (We use it and we're audited all the time.) CommandBox does "a lot" and it can be overwhelming. But in this instance we want to use it for one thing; to EXPORT the Adobe server's configuration into a JSON file. Then you can use it (commandBox) to import that JSON file into the Lucee server. It will effectively mirror your Adobe configuration, into the Lucee server. And give you a pretty-damn close match. I see "close" because lucee might have a setting that ACF doesn't - or vice-versa - and these "oddities" - simply get ignored when you do the import, - The CommandBox app takes care of all the background mapping from Adobe's XXX to JSON config item 1 And then maps JSON config 1 to Lucee's config item ZZZ. Then at least you can have a little "comfort" that you're comparing apples to apples.
m
Is that right! Wow that could really help
Indeed yes - can i just export the server settings directly from CF and then use commandbox to import it into Lucee?
As the CF server on the instance is a standard CF installatio
g
I dont think the export of either engine is compatible with the other vendors.
m
i got the server on my local up and running now btw 🙂 and have access into the application
ah ok
g
Which is where CommandBox is handy - it does all the interpretation between the two. And the JSON file it creates is a little easier to grapple with as a human, as opposed to XML.
"I" quite like XML - but JSON is nicer.
I'll be back later to see how you have gotten on - First things - give us the fusebox struct from both servers
m
superb thanks so much for all this 🙏