Code Monkey home page Code Monkey logo

cfwheels's Introduction

GitHub Workflow Status (with event) Dynamic JSON Badge

CFWheels

CFWheels provides fast application development, a great organization system for your code, and is just plain fun to use.

One of our biggest goals is for you to be able to get up and running with CFWheels quickly. We want for you to be able to learn it as rapidly as it is to write applications with it.

Getting Started

In this Beginner Tutorial: Hello World, we'll be writing a simple application to make sure we have CFWheels installed properly and that everything is working as it should. Along the way, you'll get to know some basics about how applications built on top of CFWheels work.

Contributing

We encourage you to contribute to CFWheels! Please check out the Coding Guidelines for guidelines about how to proceed. Join us!

Running Tests

Before running tests, make sure that all debugging is turned OFF. This could add a considerable amount of time for the tests to complete and may cause your engine to become unresponsive.

  1. Create a database on a supported database server named wheelstestdb. At this time the supported database servers are H2, Microsoft SQL Server, PostgreSQL and MySQL.
  2. Create a datasource in your CFML engine's administrator named wheelstestdb pointing to the wheelstestdb database and make sure to give it CLOB and BLOB support.
  3. Open your browser to the CFWheels Welcome Page.
  4. In the gray debug area at the bottom of the page, click the Run Tests link next to the version number on the Framework line.

Please report any errors that you may encounter on our issue tracker. Please be sure to report the database engine (including version), CFML engine (including version), and HTTP server (including version).

License

CFWheels is released under the Apache License Version 2.0.

Our Contributors

Made with contrib.rocks.

cfwheels's People

Contributors

absentbri avatar adamzenu avatar andybellenie avatar bpamiri avatar cannikin avatar chapmandu avatar chrisdpeters avatar dbeard avatar dbelanger avatar dependabot[bot] avatar ellor1138 avatar geirman avatar gralen avatar jbampton avatar liferealized avatar michaeldiederich avatar mvdo79 avatar neokoenig avatar nialexsan avatar nikolajfrey avatar perdjurner avatar raulriera avatar reubenbrown13 avatar rip747 avatar scahyono avatar sebastienfct avatar timbadolato avatar xouqoa avatar zainforbjs avatar zspitzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfwheels's Issues

Rendering with JSON problem

Hello,

I don't know if i am wrong but, this is so not working.

After activating provides("html, json, xml") in my init method of my controller, and in the said view action, say index, i use something like, renderWith(users).

http://localhost/app/users.json doesn't work, as it gives a blank page but trying out
http://localhost/app/users.xml returns an xml document.

Tried this in version 1.1.7 and 1.1.8 and it still doesn't work.

Thanks

$pluginsExtract AND wheels/public/plugins.cfm

When you extract a new plugin that is in the plugins directory, you unzip it to a folder that is named exactly as the Plugin name.
Line 92: wheels/Plugins.cfc - method $pluginsExtract

This is fine except that on
Line 2: wheels/public/plugins.cfm
you reference that name in lowercase format....

This does not work on systems that use case-sensitive file/folder names. i.e. Linux, Unix

When cfwheels creates the link to take you to the Plugin management page via the wheels/events/onrequestend/debug.cfm it lowercases the name of the plugin, which is then sent as the name variable in url...

This name variable is added to the params structure and used in
Line 2: wheels/public/plugins.cfm
to specifiy the name of the folder the plugin is in... With Case-sensitive Operation systems this is a problem...

My solution, and it should work for all O.S.'s is to NOT lowercase the Plugin name in the debug.cfm file and NOT lowercase the params.name variable in the wheels/public/plugins.cfm file...

To fix...
Change Line 2: wheels/public/plugins.cfm
From:
<cfinclude template="../../plugins/#LCase(params.name)#/index.cfm">
To:
<cfinclude template="../../plugins/#params.name#/index.cfm">

AND

Line: 107: wheels/events/onrequestend/debug.cfm
From: Snippet follows...
?controller=wheels&action=wheels&view=plugins&name=#Lcase(loc.i)#

To: Snippet follows...
?controller=wheels&action=wheels&view=plugins&name=#loc.i#

Dom

Issue with 1.2

I downloaded the 1.2 release from github and (after renaming my old wheels folder) copied the new wheels folder over. I'm assuming that's the way to upgrade, I couldn't find any notes on upgrading from 1.1.8 to 1.2. Probably haven't been written yet. Anyway I reloaded my test application and got an error straight away:

Element $LAYOUT is undefined in ARGUMENTS.

The error occurred in /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 42
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 84
Called from /var/www/virtual-demo/bankalyzer/controllers/User.cfc: line 55
Called from /var/www/virtual-demo/bankalyzer/wheels/global/cfml.cfm: line 188
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/processing.cfm: line 85
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/processing.cfm: line 60
Called from /var/www/virtual-demo/bankalyzer/wheels/dispatch/request.cfm: line 167
Called from /var/www/virtual-demo/bankalyzer/wheels/index.cfm: line 1
Called from /var/www/virtual-demo/bankalyzer/rewrite.cfm: line 1
Called from /var/www/virtual-demo/bankalyzer/wheels/events/onrequest.cfm: line 1

40 :
41 : // if no layout specific arguments were passed in use the this instance's layout
42 : if(!Len(arguments.$layout))
43 : arguments.$layout = $useLayout(arguments.$action);
44 :

So on my User.cfc controller I updated the code to change:

    <cfset renderPage(hideDebugInformation="true")>
    <cfset usesLayout("../layout")>

to:

    <cfset renderPage(layout="../layout", hideDebugInformation="true")>

Now I'm getting this error:

Element CLASS is undefined in a CFML structure referenced as part of an expression.

The error occurred in /var/www/virtual-demo/bankalyzer/wheels/view/miscellaneous.cfm: line 277
Called from /var/www/virtual-demo/bankalyzer/wheels/view/forms.cfm: line 287
Called from /var/www/virtual-demo/bankalyzer/wheels/view/forms.cfm: line 320
Called from /var/www/virtual-demo/bankalyzer/wheels/view/formsobject.cfm: line 37
Called from /var/www/virtual-demo/bankalyzer/views/user/login.cfm: line 22
Called from /var/www/virtual-demo/bankalyzer/wheels/global/cfml.cfm: line 152
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 507
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 266
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 68
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/rendering.cfm: line 84
Called from /var/www/virtual-demo/bankalyzer/controllers/User.cfc: line 55
Called from /var/www/virtual-demo/bankalyzer/wheels/global/cfml.cfm: line 188
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/processing.cfm: line 85
Called from /var/www/virtual-demo/bankalyzer/wheels/controller/processing.cfm: line 60
Called from /var/www/virtual-demo/bankalyzer/wheels/dispatch/request.cfm: line 167
Called from /var/www/virtual-demo/bankalyzer/wheels/index.cfm: line 1
Called from /var/www/virtual-demo/bankalyzer/rewrite.cfm: line 1
Called from /var/www/virtual-demo/bankalyzer/wheels/events/onrequest.cfm: line 1

275 : else
276 : {
277 : loc.returnValue &= $tagAttribute(loc.key, arguments.attributes[loc.key]);
278 : }
279 : }

Looking at it I see a reference to one of my view files which is a simple login form and contains this line:

textField(label="Email", objectName="user", property="email", class="loginBox", autocomplete="off")

If it's something I'm doing wrong please let me know, I realise this is only a beta and hope that the above gives you enough to work with, if you want more info or I can help in any way then let me know.

Instructions for generating documentation incorrect?

The CFWheels README says that documentation can be re-generated by navigating to /builders/api/index.cfm

This is most certainly not working for me and i cannot figure out how it could (no builders controller, no api action). Is documentation generation provided by a separate project?

Locale support

Tony asked me to post an issue regarding the new locale support for 1.2. Specifically some of the internal wheels methods that need to have localization included. So that's what I'm doing :)

Here's the list I posted in the Google Group:

https://groups.google.com/forum/#!msg/cfwheels/imQoQjcRzVo/HYKwt-9jfvMJ

distanceOfTimeInWords()
timeAgoInWords()
timeUntilInWords()

If I see others then I will add them here as comments.

HTH

renaming of public api methods

right now the way we do private methods in wheels is to start the method name with a dollar sign ($). the problem with this is that there are some public api methods (like the CFML extension methods) that start with a dollar sign also. Needless to say, this is kind of confusing.

What we should do is start these methods with an underscore (_) so that we can easily parse them in the api and also it will be more clear to the developers what these methods are for.

Automatically set labels on association keys

Currently, you need to do the following to define labels on an association key:

<cfset belongsTo(name="Client")>
<cfset property(name="clientId", label="Client")>

This should be automatic.

Autolink incorrectly links

Autolink appears to want to link anything with a forward slash in it.

i.e

foo="Jon and Joe were/maybe doing something";
foo=autolink(foo);

Outputting foo then gives

 Jon and Joe were
<a href="/maybe">/maybe</a>
doing something 

Error saving blank string to nullable int column (sql server)

When you have a column specified as a nullable integer with no default set in the db or model, if you pass it a blank string it throws an error:

Invalid data '' for CFSQLTYPE CF_SQL_INTEGER.

The error occurred in C:\Inetpub\eva\trunk\wheels\model\adapters\Base.cfc: line 243
Called from C:\Inetpub\eva\trunk\wheels\model\adapters\MicrosoftSQLServer.cfc: line 140

The correct behaviour would be to resolve the blank string as NULL.

"The element at position 22 cannot be found."

RE: "The element at position 22 cannot be found."


This is a random error occurring on CFWheels Framework on page load; loading on Controller/Action/.

Seems to pop up on some occasions, occurs on random.

A bug within CFWheels Framework.


ERROR:

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

The element at position 22 cannot be found.

The error occurred in C:\WServer\trunk\Web\Freemium\wheels\global\internal.cfm: line 813
Called from C:\WServer\trunk\Web\Freemium\wheels\global\internal.cfm: line 803
Called from C:\WServer\trunk\Web\Freemium\wheels\events\onrequeststart.cfm: line 77
Called from C:\WServer\trunk\Web\Freemium\wheels\global\cfml.cfm: line 44
Called from C:\WServer\trunk\Web\Freemium\wheels\events\onrequeststart.cfm: line 23

811 : for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
812 : {
813 : loc.route = application.wheels.routes[loc.i];
814 : if (StructKeyExists(loc.route, "name") && len(loc.route.name))
815 : {

Resources:

Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

Browser Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11


environment switch - avoid in production environment.

Hi

I'm getting a little stressed when it gets to switch environments from production to another, and a little more stressed when passwords are url defined... IMHO, a production environment cannot be lowered down to a test or dev site. Still however the opposite could be interesting (running a test env as a prod one.)

So I disabled the possibility to switch from prod into something lower by modifying the "wheels/events/onrequeststart.cfm" file. (my working cfwheels version is 1.1.5.)

from line 17
if (application.wheels.environment neq "production"){
// reload application by calling onApplicationStart if requested
if (StructKeyExists(URL, "reload") && (!StructKeyExists(application, "wheels") || !StructKeyExists(application.wheels, "reloadPassword") || !Len(application.wheels.reloadPassword) || (StructKeyExists(URL, "password") && URL.password == application.wheels.reloadPassword)))
{
$debugPoint("total,reload");
$simpleLock(execute="onApplicationStart", name="wheelsReloadLock", type="exclusive", timeout=180);
}
}

This is a quick hardcoded solution, and should be extended by adding ip addresses ranges to leave corporate IT the ability still to override this security issue.

Best regards

Element 'xxx' is undefined in a CFML structure referenced as part of an expression.

RE: Element 'xxx' is undefined in a CFML structure referenced as part of an expression.


This is a random error occurring on CFWheels Framework - Reload.

Seems to pop up on some occasions, for no apparent reason.

Only occurs on random.


ERROR:

The error occurred in C:\WServer\trunk\Web\Freemium\wheels\controller\initialization.cfm: line 49
Called from C:\WServer\trunk\Web\Freemium\wheels\global\cfml.cfm: line 44
Called from C:\WServer\trunk\Web\Freemium\wheels\controller\initialization.cfm: line 82
Called from C:\WServer\trunk\Web\Freemium\root.cfm: line 1
Called from C:\WServer\trunk\Web\Freemium\wheels\global\internal.cfm: line 433
Called from C:\WServer\trunk\Web\Freemium\wheels\controller\initialization.cfm: line 10
Called from C:\WServer\trunk\Web\Freemium\wheels\global\public.cfm: line 129
Called from C:\WServer\trunk\Web\Freemium\wheels\dispatch\request.cfm: line 163
Called from C:\WServer\trunk\Web\Freemium\wheels\index.cfm: line 1
Called from C:\WServer\trunk\Web\Freemium\rewrite.cfm: line 1
Called from C:\WServer\trunk\Web\Freemium\wheels\events\onrequest.cfm: line 1

47 : cffunction name="$setControllerClassData" returntype="void" access="public" output="false"
48 :
49 : variables.$class = application.wheels.controllers[arguments.name].$getControllerClassData();
50 :
51 : /cffunction


$depreciate method is broke

Line 88: cfthrow type="expresson'??

Not sure what this method is doing. It's causing a call to renderPage() to fail but not giving any debug. Investigating.

Feature Request: Possibly moving app files to /app vs. having it all in the root? a la Rails 3.1

We've built a fork with this implemented, at https://github.com/ucdev/cfwheels/tree/1.1-release
Not sure though, but I think this screws something up... the pages render just fine... but strangely I think it hangs for a really long time before loading each page... wondering if it's traversing the folders looking for the folder instead of just going straight for it?

Who knows!

Never the less, we like the Rails structure and were just trying to figure out a good way to implement this without totally screwing CFWheels stability :-)

Oh, and assets are organized differently in Rails such that:

/app
----/assets
----------/javascripts/
----------/stylesheets/
----------/images/
/vendor
----/assets
----------/javascripts/
----------/stylesheets/
----------/images/
/lib
----/assets
----------/javascripts/
----------/stylesheets/
----------/images/
/public
----/assets
----------/images/
----------application.js
----------application.css

But I'm sure you already knew this... just figured I'd document it here if we were to plan on moving this way...?

duplicate unique ids with nested properties

I'm creating a bunch of blank nested properties "requestItems" by looping over a count of all publications available (say 30 of them).This may generate duplicate unique IDs, for example;

order[requestitems][1345063390250][publicationid]

may appear twice, and on refresh, a different duplicate ID pops up at another position. Out of the 30 or so properties, duplicate IDs show up minimum 2 or 3 times out of the 30.

May be related to gettickcount() is being used in _$initModelObjec_t function in initialization.cfm, I added a breather for
Coldfusion with sleep() and that fixes the issue for me.

// keep a unique identifier for each model created in case we need it for nested properties
sleep(50);
variables.wheels.tickCountId = GetTickCount().toString(); // make sure we have it in milliseconds

A new proposal for polymorphic support at the model level.

I think it's fairly important to pursue a polymorphic feature, even if it's just a plugin.

adding argument 'hasMany':
hasMany(name="assets",as="attachable");

adding argument to 'belongsTo':
belongsTo(name="attachable",polymorphic=true);

I've been doing a lot of Rails 3 / ActiveRecord porting lately and I'm tempted to take the project on.

Here are my current port projects:

  • ActiveSupport::Inflections
  • acts_as_taggable_on
  • acts_as_messageable
  • acts_as_url
  • ancestry
  • mailboxer
  • scope

I'd love to add this to the list... but before I do that, curious if anyone is also interested in partnering on it?

Make external paths for imagePath possible

I have adjusted a small piece of code in cfwheels 1.1.8 to fix a problem that we were having.

Our problem was that we needed to put an external directory as our default image directory. This allows us to move our assets to a content delivery network (CDN) without having to update each and every imageTag() function. In the current code of wheels you can change the default image directory, but only to another internal paths. The below code change allows you to set it to either an internal or an external path, such as a CDN URL.

I have adjusted the file wheels/view/assets.cfm by changing line 170 and 171 from:

if(Left(arguments.source, 7) == "http://" || Left(arguments.source, 8) == "https://")
loc.localFile = false;

To:

if(Left(arguments.source, 7) == "http://" || Left(arguments.source, 8) == "https://")
{
loc.localFile = false;
arguments.src = arguments.source;
}
else if(Left(application.wheels.imagePath, 7) == "http://" || Left(application.wheels.imagePath, 8) == "https://")
{
loc.localFile = false;
arguments.src = application.wheels.imagePath & "/" & arguments.source;
}

After this code change, it is possible to set the image default path to either a local or an external URL. You can still use full URLs in the imageTag() function as well to override the default path. We can now switch between the CDN and the local server simply by adjusting the variable application.wheels.imagePath.

Reason for this change? I feel the current process is not very consistent. We are allowed to use the imageTag function with an external path. We can also change the default path for the images. But when changing the default path, all of a sudden only local paths are allowed. Also, we can use assetPaths to link javascript and stylesheets from external locations in one simple go, but I'm not sure why the same then is disallowed for images?

Apart from consistency, there is a very practical reason for this change. With this change, you can easily manage your assets within the Wheels framework, without the need to break out of it. You can move your assets locally, to a CDN or to any different location by simply updating the imagePath. Obviously we can just change of hundreds or thousands of lines of code (each and every image link). Granted, this can usually be done with search and replace, but one of the nice things about the Wheels framework is that it encourages you to manage your resources in a structured manner. With this small change it becomes possible to shift local assets to a CDN and back again, or to from one CDN to another, simply by updating the imagePath, much in the same way as you can shift javascript and css easily. I would consider that an improvement.

cfwheels application JRun 500 error on first load

When my cfwheels application first loads it hangs for two minutes or so and then returns a 500 JRun server error. (coldfusion.runtime.RequestTimedOutException: The request has exceeded the allowable time limit Tag: cfoutput)

When reloading the page again it works normally. I'm only experiencing this issue which cfwheels applications on my server.

Feature Request: add custom headers to emails.

I was looking for a way to add custom headers to emails.
The CFMAIL tag uses cfmailparam as a child tag to accomplish this:

But I did not want to use the CFMAIL tag.

I found that Wheels has an undocumented mailparams feature.
However it seems that this idea was never finished, which is perhaps
why it is not documented.

So I found a way to use mailparams in sendEmail(), as mailparams is
ignored:

< !--- Send the Email, $deliver = false returns a struct -- >
< cfset theEmailArgs= sendEmail(
from='email@address'
, to='email@address'
, subject='Subject'
, $deliver = false
)>
< !--- Add a mail header to the struct & then pass it to the $mail function --- >
< cfset theEmailArgs.mailparams = [{name='X-CustomHeader',value='123'}] >
< cfset $mail( argumentCollection=theEmailArgs ) >

I think it would be quite useful to have the mailparams argument fully
implemented in sendEmail().

isAjax() function broken in 1.2 preview

It seems that the request.cgi.http_x_requested_with variable is empty in a request made via ajax, when it should be "XMLHTTPRequest".

This causes the isAjax() function to return false for ajax requests, which in turn displays the CFWheels debug output.

Railo 3.2.0

max records?

I created an admin page for a MySql table that has 10,000 records using the scaffold plugin, but the number of records that are displayed on the index page is 5,099. Any clues why the full set does not return with the controller query?

thanks, David

CF10, REST and CFWheels

Hi,

I just noticed that cf10 supports REST out of the box. Is there any plan to incorporate that into the next cfwheels release?

findByKey does not behave correctly when used with Oracle database

Using CFWheels 1.1.8 with Oracle 10g.

When executing a findByKey() function and using Oracle 10g, only the id property of the object is returned, this is not consistent with MySQL or the documented behaviour of this function.

Example code:-

loc.person = model("person").findByKey(1);
assert("IsObject(loc.person)");
assert("IsDefined('loc.person.surname')");    // assert fails since IsDefined returns NO

Specifying returnAsQuery allows me to see what is being executed, looks like a bug with the Oracle paging implementation.

SELECT p_id
FROM
  (SELECT tmp.p_id,
    rownum rnum
  FROM
    (SELECT t_person.P_ID,
      t_person.P_SURNAME   AS surname,
      t_person.P_FORENAMES AS forenames,
      t_person.P_TITLE     AS title,
      t_person.P_GENDER    AS gender,
      t_person.P_DOB       AS dateOfBirth
    FROM t_person
    WHERE t_person.P_ID = ?
    ) tmp
  WHERE rownum <=1
  )
WHERE rnum >0 

Having trouble building 1.1-release branch...?

Just get this error when I try to run build.cfm... :-\

Railo 3.3.4.003 Error (expression)
Message     key [CACHEDATABASESCHEMA] doesn't exist in struct (keys:IPEXCEPTIONS,FILEPATH,CACHECATEGORIES,SENDEMAILONERROR,MIXINS,NONEXISTINGHELPERFILES,SESSIONMANAGEMENT,AUTOMATICVALIDATIONS,OVERWRITEPLUGINS,OBFUSCATEURLS,CACHEROUTES,WHEELSCOMPONENTPATH,FORMATS,CACHEIMAGES,DELETEPLUGINDIRECTORIES,SETUPDATEDATONCREATE,CACHES,CACHESETTINGS,LOADINCOMPATIBLEPLUGINS,TABLENAMEPREFIX,EXCLUDEFROMERROREMAIL,CACHEQUERIES,EXISTINGLAYOUTFILES,EXISTINGOBJECTFILES,EVENTPATH,MIMETYPES,SOFTDELETEPROPERTY,PROTECTEDCONTROLLERMETHODS,RELOADPASSWORD,FLASHSTORAGE,PLUGINCOMPONENTPATH,CONFIGPATH,CACHEPAGES,CACHEMODELINITIALIZATION,MODELS,ENVIRONMENT,CACHEACTIONS,DATASOURCEPASSWORD,CACHECONTROLLERINITIALIZATION,ROUTES,IMAGEPATH,LOCALES,VIEWPATH,SHOWERRORINFORMATION,LOADDEFAULTROUTES,CONTROLLERPATH,CACHEQUERIESDURINGREQUEST,PLUGINS,MODELPATH,SHOWDEBUGINFORMATION,LOCALE,MODELCOMPONENTPATH,INITIALIZED,DATAATTRIBUTEDELIMITER,WEBPATH,URLREWRITING,ERROREMAILSUBJECT,VERSION,NONEXISTINGLAYOUTFILES,NONEXISTINGOBJECTFILES,ASSETQUERYSTRING,INCOMPATIBLEPLUGINS,DISPATCH,TIMESTAMPONUPDATEPROPERTY,JAVASCRIPTPATH,ERROREMAILADDRESS,FUNCTIONS,STYLESHEETPATH,VENDOR,PLUGINOBJ,NAMEDROUTEPOSITIONS,CLEARQUERYCACHEONRELOAD,PLUGINPATH,DATASOURCEUSERNAME,SERVERVERSION,TIMESTAMPONCREATEPROPERTY,SERVERNAME,EXISTINGHELPERFILES,ASSETPATHS,CONTROLLERS,REWRITEFILE,ROOTPATH,USEEXPANDEDCOLUMNALIASES,CACHEPLUGINS,ROOTCOMPONENTPATH,DATASOURCENAME,CACHEPARTIALS,DEPENDANTPLUGINS,TRANSACTIONMODE,CACHEFILECHECKING)

Feature request: updateRoute() method

Hi,
I would like to see an updateRoute() method.

It would help to build cfwheels applications which can based on different hostnames serve multiple websites from one codebase.

It would be possible to have a switch-block based on hostnames in events/onrequeststart.cfm which would updateRoute() to the actual controller and action.

Here is some more information on this topic.
https://groups.google.com/forum/?fromgroups=#!topic/cfwheels/sUdizsFWhQg

Regards
Thorsten

move documentation from google code wiki into docs folder

rather then having the documentation residing inside the google code wiki, we should pull it out and move it into a docs directory under the wheels root. this will make it easier for core to document new features and correct errors easier. it will also allow others to help by simply forking the repo.

the easiest syntax to work with is markdown since github supports this directly. the trick is we will have to convert the existing documentation from google code wiki syntax to markdown.

http://code.google.com/p/wikiwym/ - javascript that converts google code wiki syntax to html. we will have to make some tweaks as some of the html it outputs isn't the best (like using tt tags)

https://github.com/domchristie/to-markdown - is an html to markdown convertor that is also javascript.

any further ideas are more then welcomed

Calculated properties do not return in query when findAll() uses select statement.

Hi,

There seems to be an issue with using calculated properties in a model and a findAll() with a select statement.

If a select is used, the calculated properties are not returned and consequently, any reference to this property in the view will throw an undefined error.

If I remove the select statement (which triggers a select *) then the calculated properties are returned.

Framework:
Wheels 1.1.8

CFML Engine:
Railo 3.3.4.003

I created some threads about this in more detail on Stackoverflow.com:
http://stackoverflow.com/questions/11816648/calculated-property-is-being-completely-ignored
http://stackoverflow.com/questions/11804443/cfwheels-calculated-property-generates-column-error-in-query

Thanks.
Michael.

Decryption has failed.

RE: "Decryption has failed."


This is a random error occurring on CFWheels Framework - Reload.

Seems to pop up on some occasions, occurs on random.

A bug within CFWheels Framework.

  • I've placed a TRY/CATCH around code within Wheels core file to prevent error : \Wheels\events\onrequest.cfm:

ERROR:

Decryption has failed.

The length of the passed string is 0 bytes.

The error occurred in C:\WServer\trunk\Web\Tesco\Web\events\functions.cfm: line 278
Called from C:\WServer\trunk\Web\Tesco\Web\events\functions.cfm: line 113
Called from C:\WServer\trunk\Web\Tesco\Web\events\functions.cfm: line 228
Called from C:\WServer\trunk\Web\Tesco\Web\controllers\Account.cfc: line 25
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\global\cfml.cfm: line 174
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\controller\processing.cfm: line 85
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\controller\processing.cfm: line 60
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\dispatch\request.cfm: line 166
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\index.cfm: line 1
Called from C:\WServer\trunk\Web\Tesco\Web\rewrite.cfm: line 1
Called from C:\WServer\trunk\Web\Tesco\Web\wheels\events\onrequest.cfm: line 1

277 :

cfset var encryptedText = arguments.valueToDecrypt
cfset var clearText = decrypt(encryptedText, getEncryptionKey(), "AES", "Hex")

cfreturn clearText


Cannot convert the value 'xxxxx' to an integer because it cannot fit inside an integer.

RE:" Cannot convert the value 'xxxxx' to an integer because it cannot fit inside an integer."


This issue occurs occurs via Obfuscation of larger Integer values!

Wheels Function name="obfuscateParam"

Issue: Function does not appear to handle larger Interger values, for example if I pass the following large Integer as a KEY:

01494581766


I've resolved the problem by TRY/CATCH and applying extra checks for ISNUMERIC!

Please see temp fix below.


ERROR:

FILE: /wheels/global/public.cfm

LINE: 229

MY FIX: APPLIED " TRY/CATCH" and additional ISNUMERICE check

FIXED CODE:

cffunction name="obfuscateParam" returntype="string" access="public" output="false" hint="Obfuscates a value. Typically used for hiding primary key values when passed along in the URL."
examples=
'
<!--- Obfuscate the primary key value 99 --->
cfset newValue = obfuscateParam(99)
'
categories="global,miscellaneous" chapters="obfuscating-urls" functions="deobfuscateParam"

cfargument name="param" type="any" required="true" hint="Value to obfuscate."

cfscript
    var loc = {};
    try
    {
            if (IsValid("integer", arguments.param) && IsNumeric(arguments.param) && arguments.param > 0)
            {
                // railo strips leading zeros from integers so do this for both engines
                arguments.param = Val(SpanIncluding(arguments.param, "0,1,2,3,4,5,6,7,8,9"));
                loc.iEnd = Len(arguments.param);
                loc.a = (10^loc.iEnd) + Reverse(arguments.param);
                loc.b = "0";

                if (IsValid("integer", loc.a))
                {
                    for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
                        loc.b = (loc.b + Left(Right(arguments.param, loc.i), 1));
                    loc.returnValue = FormatBaseN((loc.b+154),16) & FormatBaseN(BitXor(loc.a,461),16);
                }
                else
                {
                    loc.returnValue = arguments.param;
                }
            }
            else
            {
                loc.returnValue = arguments.param;
            }
    }
    catch (Any e)
    {
    loc.returnValue = arguments.param;
    }
cfscript    

cfreturn loc.returnValue

cffunction


model.create() with no properties errs

If I try to call model.create() with no properties the model call fails and gives the following error: ERROR: syntax error at or near ")". (DB = postgres)

Calling it this way is equivalent to this SQL:
insert into table () values();

I can get around this by doing the following: model.create(name="") which inserts a null in for the name property, and prevents the above bad statement (for postgres).

The proper way to insert a record like this for postgres (and likely other DBs) is:
insert into table default values;

findAll() ignore 'group' & 'distinct' when used with calculated properties

http://code.google.com/p/cfwheels/issues/detail?id=672

For example:

<cfcomponent extends="Model" output="false">
        <cffunction name="init">
                <cfset property(name="first_letter", sql="SubStr(name, 1, 1)")>
        </cffunction>

        <cffunction name="first_letters">
                <cfreturn this.findAll(select='first_letter', group='first_letter', order='first_letter')>
        </cffunction>
</cfcomponent>

findAll() doesn't group. The same with:
findAll(select='first_letter', distinct=true, order='first_letter')

Reported by [email protected], Dec 9, 2010

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.