Using contentbox to build my new site

I’m about to start building a new website and am planning to use Contentbox as the starting point.

The current version of Contentbox does about 20% of what I want my final site to do. In addition, I plan to build modules with ColdBox to do the other 80%.

Is there anyone else who has done that and could give me some pointers on the best way to begin?

In the short term, I would like to understand the best way to deal with future Contentbox upgrades. Should I manage the Contentbox code using git or is Commandbox able to upgrade that code?

Has anyone found a need to change the existing code rather than just add modules?

If so did that make upgrading difficult?

Thanks in advance
Kevin Roche

CommandBox does great at managing contentbox.

This video is old but should help.
I will try to get some more materials together for you too.

Thanks Gavin that would be great.

Hi @kevin-r would love to assist as well. Remember that ContentBox is not like a traditional CMS, in the sense that everything is based off ColdBox. So you can extend and flex via ColdBox modules, models, handlers, interceptors, etc. You are free to extend the full application.

Every module in ForgeBox is also compatible for your app.

Post any questions, and we will assist.

As a developer who has never used ContentBox, I had a few quick thoughts:

  1. There’s no need to track contentbox code in your Git history, unless you modify ContentBox.
  2. Don’t modify ContentBox or you will never be able to upgrade without a long and painful sync process.
  3. Instead, submit a PR to ContentBox which allow you to hook in additional features. Adding a single interceptor annunciation, for example, should give you additional areas to extend ContentBox.
  4. ContentBox already supports modules (mentioned) as well as widgets and interceptors.

As a quick example, you could register a custom spam check interceptor to run on the cbui_preCommentPost interception. No core modification necessary. Then when you’re done, you can submit this to Forgebox as a ContentBox module so everyone can benefit… and any other sites you build can easily include this module in the installation process.

Thank you.

I’m looking through forgebox and have found the contentbox form builder which looks promising for some of the job. When I installed it it seemed to install OK and I was able to go to the ContentBox modules menu and activate it, but in next step of the instructions (on github) it says “Use the Form Builder menu link to go to the form builder admin section. In the form builder admin section you can create your forms and view form submissions.” Unfortunately it doesn’t tell you where to find that link and I have looked in the ContentBox admin and can’t find it.

I suspect there may be an issue here with versions. I am running ContentBox v5.3.0+246 and the most recent form builder version is dated February 10, 2022.

Thank you Michael. I will investigate that.

1 Like

This afternoon I have also tried a few alternative themes this afternoon and found all the ones I tried failed to work when I clicked on the preview button. They were all easily fixable so no real issue. I would like to share the fixes but I can’t see a way to do that on ForgeBox without creating a completely new project. Should I do that?

I wouldn’t create a completely new project. All the ContentBox themes I’m aware of are open source, so you can easily make a change and fix the theme for the next developer to come along. (Which may well be you!)

If you’re unfamiliar with making open source PRs, you could comment here with your issues and someone can use that info to make the fix.

I’m looking through forgebox and have found the contentbox form builder which looks promising for some of the job. When I installed it it seemed to install OK and I was able to go to the ContentBox modules menu and activate it, but in next step of the instructions (on github) it says “Use the Form Builder menu link to go to the form builder admin section. In the form builder admin section you can create your forms and view form submissions.” Unfortunately it doesn’t tell you where to find that link and I have looked in the ContentBox admin and can’t find it.

If I try and go directly to the page it fails with the following message:
“No entity (persistent component) with name [Field] found, available entities are…”

Looks like it is trying to find the Field.cfc which has been installed in the correct location. It is in
'contentBox\modules\contentbox\modules_user\contentbox-formbuilder\models' on my windows machine.

I suspect there may be an issue here with versions. I am running ContentBox v5.3.0+246 and the most recent form builder version is dated February 10, 2022.

Is anyone using Form Builder with version 5 able to point me as to why this fails and why the menu isn’t updating?

Hey Kevin,
I am not a ContentBox developer or user, but the entity error message is saying that the “Field” entity is not known to the ORM engine. This means you need to run an ORM reload after installing the extension. There should be an option in the Admin menu or gear button to “Reload ORM”, which should correct this issue.

Let me know if that works - if it doesn’t, you need more knowledgeable help than I. :sunglasses:

Also, what “contentbox form builder” are you speaking of? Do you mean this one by Curt Gratz?

Items of note:

  • This module was last updated 5 years ago
  • This module supports ContentBox v3.
  • You are (probably) on ContentBox v5.

I suspect that module needs updating for ContentBox 5 support.

Yes, that is the one. I was hoping someone had already used it and made some changes. If not I may just have to write my own.

So far my luck with finding Forgebox modules that work with contentbox 5.3 has been zero.

I tried the ORM Reload and it made no difference to the error message or the lack of admin menu entry.

Kevin

The docs suggest either an ORM reload or an app reinit.

Specifically:

Once CommandBox is done, you can log into ContentBox, and click ‘Modules > Manage’ and activate the module ( or reinit the app ).

I would try:

  1. An ORM reload after installing the module.
  2. Reinitting the app
  3. Restarting the CF server
  4. Checking the server logs
  5. Checking the database table for the menu entry

If you have to fix an existing bug in that module, I would highly recommend submitting a patch PR as opposed to building a custom (duplicate) module.

I have already tried all those things.

Now hunting for the bug.

Thanks for the suggestions anyway.

Specifically, after adding the new menu item it is in the admin menu array but by the time the array is used to draw the menu, it has gone again.

I think it might relate to the order things are happening but I’m challenged by trying to learn the coldBox way of doing things at the same time.

Kevin

I finally had some time to investigate again. I found that the lines in the code which say:

var menuService = controller.getWireBox().getInstance( “AdminMenuService@cb” );

have to change to:

var menuService = controller.getWireBox().getInstance( “AdminMenuService@contentbox” );

I have posted a change request for the page in the ContentBox manual.