Persistance of variables failing due to null support

Description

It appears that Coldbox has some problem with having nullSupport = true.

Some examples:

#1
for “Layout” arguments in setView():

This code:

event.setView( view="main/login", layout="login" )

and this

event.setView( view="main/login" ).setLayout( "login" );

gets this error:

ROOT\apps\manager\views\AuthController\login.cfm] not found

It works if i use chaining:

event.setView( "main/login" ).setLayout( "login" );


#2
for “noLayout” arguments in setView():

This code:

event.setView( view="main/login", noLayout=true );

get this error:

ROOT\apps\manager\views\AuthController\login.cfm] not found

Like “layout” works if I use the chaining method:

event.setView( "main/login" ).noLayout();

 

#3

for relocate() method

For any value (url, uri or event):

relocate( uri="/manager/dashboard" ); <-- my phisical url relocate( "/dashboard" ); relocate( event="MainController.dashboard" );

i get an error:

Cant cast Null value of type collection

Attach the full error:

 

I talked about these things on forums with :
https://community.ortussolutions.com/t/some-questions-starting-with-coldbox/9254

Attachments

5

Activity

Show:

Luis MajanoJune 20, 2022 at 4:59 PM

Ok, solved them, but still logged a ticket on lucee too.

Luis MajanoJune 20, 2022 at 4:56 PM

Some are bugs in lucee when using argumentCollection = arguments it does not default the arguments.

Roberto MarzialettiJune 18, 2022 at 9:03 PM

What do you mean not working?

sorry for the poor feedback 😅

I need to do a few more tests, then open a post on the community forum.

Many thanks.

Roberto MarzialettiJune 18, 2022 at 8:26 PM
Edited

Ok, I download and installed 6.7.0-snapshot.

some feedback:

#1
This code:

event.setView( view="main/login", layout="login" )
event.setView( view="main/login" ).setLayout( "login" );

now it works fine! winking face

 

#2
event.setView( view="main/login", noLayout=true );

this works fine too.

 

#3

for relocate() nethod:

#3.1 this works:

relocate( "/manager/login" )


#3.2 this not works:

relocate( url="https://www.google.com" )

get this error:

Error: Can't cast String [] to a boolean in Controller.cfc 1220: arguments.ssl ? replaceNoCase( arguments.inURL, "http:", "https:" ) : replaceNoCase(

 

this is dump of arguments for updateSSL() method:
ssl is null

 

#3.3 this not works:

relocate( relocate( uri="/public" ) )

get this error:

Error: Can't cast Null value to value of type [collection] in AbstractFlashScope.cfc 293: for ( var key in arguments.map ) {

 

#3.4 this not works (same as 3.2):

relocate( event="MainController.datajs" )

get this error:

Error: Can't cast String [] to a boolean in Controller.cfc 1220: arguments.ssl ? replaceNoCase( arguments.inURL, "http:", "https:"

Hope this help.

Many thank for big work !

Luis MajanoJune 18, 2022 at 2:54 PM

What do you mean not working? Are you getting an exception? Remember, noExecution needs to fire BEFORE any event. If not, it’s too late.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Sentry

Created June 3, 2022 at 12:05 PM
Updated June 20, 2022 at 4:59 PM
Resolved June 17, 2022 at 3:38 PM

Flag notifications