FW/1 - Framework One - is a lightweight, convention over configuration, MVC application framework for ColdFusion / CFML.
[github-fw1]
[framework-one/fw1] Pull request closed: framework-one/fw1#504 by seancorfield
[github-fw1]
[fw1:develop] 2 new commits by Matthew J Clemente and 1 other
Access-Control-Allow-Methods →OPTIONS,POST,GET
, and Angular throws an error that PUT (and curiously POST) wasn't allowed. For reference, here's a portion of the FW/1 settings from app.cfc:variables.framework = {
action = 'action',
defaultSection = 'main',
defaultItem = 'default',
reloadApplicationOnEveryRequest = true,
generateSES = true,
SESOmitIndex = true,
diEngine = "di1",
diComponent = "framework.ioc",
diLocations = [ "/model", "/controllers", "/sharedModel" ],
diConfig = { },
routes = [
{ "$RESOURCES" = "actor,movie,movieToActor" }
],
resourceRouteTemplates = [
{ method = 'get', httpMethods = [ '$GET' ] },
{ method = 'post', httpMethods = [ '$POST' ] },
{ method = 'get', httpMethods = [ '$GET' ], includeId = true },
{ method = 'put', httpMethods = [ '$PUT' ], includeId = true },
{ method = 'patch', httpMethods = [ '$PATCH' ], includeId = true },
{ method = 'delete', httpMethods = [ '$DELETE' ], includeId = true },
{ method = 'error', httpMethods = [ '$*' ] }
],
decodeRequestBody = true,
preflightOptions = true
};
OPTIONS,POST,GET
in the Access-Control-Allow-Methods
response. But at lease we can hit POST/PUT/PATCH/DELETE directly in Postman and get back the expected results.
resp.setHeader( "Access-Control-Allow-Methods", "OPTIONS," & uCase( structKeyList( request._fw1.routeMethodsMatched ) ) );
resourceRouteTemplates
machinery generates a bunch of different routes and so each of those distinct routes will have a different set of verbs that work with them -- and therefore each route will respond differently to OPTIONS.
default
,show
, create
, update
, and destroy
) and removed the custom resourceRouteTemplates
config setting. Here's my current app.cfc and actor.cfc: https://gist.github.com/cfvonner/1f9dfd96d43a33a178b03f98c9666fb2
OPTIONS,POST,GET
returned in the Access-Control-Allow-Methods
header.
MURA CMS 6.2.6303
Windows 10
Coldfusion 2018
I have just upgraded my CF application server from CF11 to CF2018. The front end works fine, but when I try and login to /admin, I get a CF error 500:
Could not find the ColdFusion component or interface blog1.establishmindfulness.admin.framework.
Ensure that the name is correct and that the component or interface exists.
This exception is thrown on all of my MURA CMS 6 websites. I have tried reloading the application, clearing the browser cache, restarting the application server, and nothing works. I have even tried creating a new MURA CMS website, using a new download, but I cannot access the admin page.
I had already made 2 fixes to get CF2018 to work with the front end. I had to remove the timeout attribute from the cfschedule tag in config/appcfc/onApplicationStart_include.cfm and also I added a fix in requirements/MURA/bean/ioc.cfc, but I think there is a more serious issue with the FW1 subsystem!
And, everything works fine in the latest version of Lucee 5.3.6
Any help would be most appreciated.