Contentbox error after ColdBox 5.1 update from 2018/06/28

I ran the updater and got the latest version of coldbox, but once that was setup, the ContentBox drop-down for the login page started to return an error on the view on line 65. This is related to creating the “remember me” drop-down. It looks like the function “option” was removed or replaced with the function"options", but it doesn’t take the same set of variables.

Just wanted to give a heads up and a huge thank you. Keep up the good work.

Yes I discovered some regressions on 5.1. They are fixed now and 5.1.1 will be out today. To fix them.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057

Awesome! Keep up the great work.

On a side note, is there a module for ContentBox to allow user login restriction to view content?

Reuben Brown

There are many ways to do that.

  1. Each conten object can have a password assigned for the page, which will be needed in order to view it.

  2. You can assign roles/permissions to security rules in the security rules panel. This way, you can secure ANYTHING in contentbox, since it is a ColdBox security module.

Thanks again Luis,

So once I have the security rule setup, is there a different login that I send the user to or is it only the admin login that is used and from there I need to redirect the user?

Thanks,
Reuben

You can use the same login if needed, just make sure that user doesn’t have the CONTENBOX_ADMIN permission, unless you want them to access the admin.

There are many listeners on the login: cbadmin_preLogin, cbadmin_onLogin, cbadmin_onBadLogin

So you could listen to cbadmin_onLogin which is a good login, and redirect the user wherever you want.

Luis,

If I wanted to extend the author data to have a meta data form that was a bit more free-form, is that something I would do by a separate module that some how extends the authors module, or do I need to fork the authors stuff and then do my customization?

Thanks,
Reuben

I don’t have details on me right now, but we’ve done this before by creating a separate module that has a separate table of author properties. Then we tie into all the interception points to modify the edit screens and save processes for authors. The interception points all over ContentBox are really useful when it comes to extending just about anything.

Luis is on vacation right now, but he may have a public example of this somewhere when he returns.

I have made some progress, but I keep getting hampered by the debug out put in the code and the logs. I am not able to trace errors down to the correct module/line combination at times. for example, I have a new field on the content table to link the content to a role for view permissions. To keep it simple, I just used the “roleID” name and spec that exists on the author’s table and then tried to setup the content handler to allow for this additional field.

When I try to load a page, I get the following in the log file : “coldbox.system.Bootstrap”,“Error: could not resolve property: roleID of: cbPage <?xml version=""1.0"" encoding=""UTF-8""?><queryexception type=”“org.hibernate.QueryException”">"

I get this on the main page:

Event: contentbox-ui:page.index
Routed URL: /
Layout: default/layouts/pages.cfm (Module: contentbox)
View: default/views/error
Timestamp: 07/20/2018 02:57:15 PM
Type: org.hibernate.QueryException
Messages: could not resolve property: roleID of: cbPage

I finally realized it was caused by me adding the roleID as a filter when trying to render a page in the PageService on line 200 when checking to show “only published pages”. I was trying to use the same function as the passwordProtection feature so that if a content entry has no roleID, it is public, but if there is an ID value, you must be a member of that role to view it. I had added .isEq( “roleID”, “” ) to that section, and that is where the error came up.

I just wonder what I am missing on this. I have roleID defined in the baseContent model. I am pretty sure I am integrating this incorrectly since I am modifying core code to make it work. If you have a suggestion about how to add a role based restriction to displaying content, I am open to that too.

Thank you for your time.
Reuben

Hi Reuben I am back from vacation

I just released a patch for coldbox that should help with contentbox.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057

– You received this message because you are subscribed to the Google Groups “CommandBox” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To post to this group, send email to . Visit this group at . To view this discussion on the web visit . For more options, visit .

I just ran the updater from commandbox and now I am getting the following:

Error building: Renderer@coldbox -> The DSL Definition {REQUIRED={true},DSL={@HTMLHelper},NAME={}} did not produce any resulting dependency. DSL: , Path: coldbox.system.web.Renderer, Error Location: D:\www\asdcwic\coldbox\system\ioc\Builder.cfc:466

For the update to work make sure you do the following.

Stop your server
Remove the coldbox folder compeltely
Install the patch
Start your server

That got it… thanks.

So what is going on when you setup a new coldbox app and install a module from forgebox and get this error:

The .modules.nsg-module-user.models.orm.socialservice name is not a valid component or interface name.
Component and interface names cannot be empty and cannot start or end with a period.

I keep looking around for where the setting might be, but I am getting nowhere.

Thanks

The module has an error. I recognize the name of that module and the person who published it seems to have mostly left the CF community several years ago. You’d need to troubleshoot what’s wrong with his code or not use his module. Remember, ForgeBox is a public package repository and anyone can upload anything there and their code might not work :slight_smile:

for my current project I need to link content to a permission ID so I can then allow external users to be created and view restricted content. I have forked the development codebase and incorporated my changes into the core files that needed updated along with creating the basic data records to make it work. Things are not tested and completed yet, but I wanted to give you guys a heads up that this could be pulled in once I have it working so that you can now have basic user registration. My hope is that the social login plugin will be able to tie into it to allow user creation also, but that is a further down the line goal.

Reuben

If I need to update an FK_field to NULL, how would I do that? CF2016 doesn’t recognize null…

Thanks
Reuben