Blog

ContentBox v4.1.0 Released

Luis Majano August 17, 2018

Spread the word

Luis Majano

August 17, 2018

Spread the word


Share your thoughts


Today we are very excited to bring you the release of ContentBox v4.1.0. This is a major release of ContentBox and it sports tons of new updates, improvements and bug fixes including a major upgrade to ColdBox v5.x which in itself gives us tons of new updates and features.

Here are the what's new guides for our release:

Getting Started

To get started with ContentBox, you can easily do via CommandBox CLICommandBox and the following commands:

mkdir mysite --cd
install contentbox-installer
server start

This will create a new site for you and startup a server so you can work with your site. If Docker and containers are your thing, we got you covered as well:

docker pull ortussolutions/contentbox &&
docker run -p 8080:8080 \
-e EXPRESS=true \
-e INSTALL=true \
ortussolutions/contentbox

Tip: Check out our Installation guides for much more installation variations.

Upgrading From 3.x

If you have a previous ContentBox installation, no worries, just make sure you are at the latest version 3.7.1 before running the simple upgrade recipe. You will find an in-depth guide on upgrading your installation here: https://contentbox.ortusbooks.com/intro/introduction/upgrading-from-v3.x

Major Features

So let's start exploring the major areas of improvement of this release.

ColdBox 5.x

The entire ContentBox core has been migrated to leverage ColdBox 5.x. This introduction has given us a plethora of features not only for development purposes but also great stability, and speed. The major areas of improvement are:

  • Performance, performance, performance
  • Container and Environment support and detection
  • Full null support
  • Inheritable entry points for Modules
  • New modularity events
  • modules_app inception
  • Default Module Exports
  • Simplified URL Routes
  • Enhanced Routers for core and modules
  • Named Routes
  • Event Caching Improvements
  • Default JSON renderings
  • Rendering Regions
  • Faster Integration Testing

You can read all about the ColdBox 5 release here: https://coldbox.ortusbooks.com/intro/introduction/whats-new-with-5.0.0

New Editor Interceptors

All content editors have the following new events being announced:

  • Editor Navigation Tab Area
    • These events fire after the final tab in a content editor, usually so you can add your own tabs
      • cbadmin_pageEditorInBody
      • cbadmin_ContentStoreEditorNav
      • cbadmin_entryEditorNav
  • Editor Navigation Body Area
    • These events fire after the final tab content panel, usually so you can add your own tab panels
      • cbadmin_pageEditorNavContent
      • cbadmin_contentStoreEditorNavContent
      • cbadmin_entryEditorNavContent

Admin Menu Services

If you are building custom ContentBox modules that attach menus to the admin menu, then this update is for you. All remove and add methods for menus now will not throw up if you reference a non-existent menu or sub menu. Cleanup is now easier since you can remove at your heart's content without worrying of getting an exception.

API Service Updates

The service layer for content objects has been updated with many new arguments and methods. As always, check out the API Docs (https://apidocs.ortussolutions.com/contentbox/4.1.0/index.html) for further insight.

  • ContentStoreService@cb
    • findPublishedContent()
      • Added a sortOrder argument
    • search()
      • parent argument can now be an entity or an entity ID
      • New slugPrefix argument which you can use to root a search on a specific content hierarchy. Ex: slugPrefix = "products" will search for all content under products/*
  • ContentService@cb
    • findPublishedContent()
      • parent argument can now be an entity or an entity ID
      • New slugPrefix argument which you can use to root a search on a specific content hierarchy. Ex: slugPrefix = "products" will search for all content under products/*
  • CommentService@cb
    • search()
    • Added a sortOrder argument

ContentBox Modules Full URL Routing

In 4.x, modules can leverage the full power of ColdBox Routing as each module has its own Router.cfc now. No more are you bound to just simple moduleEntryPoint/handler/action URLs, you can now use the full expressive power of ColdBox Routes:

cbadmin/{module-entry-point}/${Setting: Full URL Route not found}

ContentBox Modules Inception

Thanks to ColdBox 5, your ContentBox modules now support full inception of child modules. Even the children will respond to full URL routing using the pattern shown previously.

New contentbox-custom Module

This is one of the major updates for this release in order to adhere to our containerization and portability strategies. Let's investigate the problem first:

In previous releases, custom code (media library, themes, widgets, and modules) had to be installed in specific folders inside of the contentbox module, which is installed by CommandBox.

+ modules
  + contentbox
    + content
    + themes
    + modules_user
    + widgets

This is fine and dandy, but the issues arise once you want to put your custom code into source control but NOT the ContentBox source. It makes no sense to store the ContentBox source code in source control since the inception of CommandBox and package management. This created many issues in figuring out how to JUST add your custom pieces to source control and then came CommandBox 4 which allowed inline updates and just destroyed custom code.

Then came our containerization strategy where we wanted a simple mount point for all custom code. This was painful under the 3.x layout.

Conventions

This gave way to the creation of the contentbox-custom module which is a module stored under the modules_app convention. This module will store all custom code and can be stored in source control without interfering with ContentBox source code.

+ modules_app
    + contentbox-custom
        + _content (media libary)
        + _modules (custom modules)
        + _themes (custom themes)
        + _widgets (custom widgets)
        ModuleConfig.cfc

Core and Custom Locations

This also gave fruition to a new feature where now you can use the custom module for your custom media library, modules, themes and widgets, but also gave way to also store CommandBox controlled core modules and themes. This means that when you install modules and themes from ForgeBox they will install under the previous locations because they are managed by CommandBox.

Custom Module Configuration

You will also find the ModuleConfig.cfc in the root of your custom module with the basics to bootstrap the module by ContentBox. The rest is up to you. You can now leverage a full module to bootstrap all your custom code. You now have the power to control the loading/unloading of all your custom assets. Yeayyy for modularity.

Custom Widgets

If you wanted to create custom widgets before you either had to place them in themes or in the core location. Now you can store them in the custom module under the _widgets folder and have them available globally.

Widget Discovery

Since the addition of these new locations for widgets we have also added a discovery process when using widgets just by name in content markup or retrieval:

  • Check custom location: modules_app/contentbox-custom/_widgets
  • Check active theme widgets folder
  • Check core location: modules/contentbox/widgets

Custom Media Library

The new custom module will also house your media library under the _content folder. The ContentBox v3 upgrader will move your library here (if it exists).

Docker Container Mount Point

If you are leveraging the CommandBox or ContentBox docker images, you can now easily mount your custom source code by just pointing it to the modules_app/contentbox-custom folder.

docker run -p 8080:8080 \
    -e express=true \
    -v `pwd`/contentbox-db:/data/contentbox/db \
    -v `pwd`/contentbox-custom:/app/modules_app/contentbox-custom \
    ortussolutions/contentbox

Multi-Factor Enrollment

We have now added the capability for users to enroll and unenroll in multi-factor authentication according to their provider of choice or admin's choice :)

Multi-Factor Enrollment

Tip: Admins can also un-enroll users as a fail-safe in order to allow them to re-enroll if needed.

Release Notes

Our release notes are quite extensive so please check out the links below:

Add Your Comment

Recent Entries

TestBox Latest Updates and News!

TestBox Latest Updates and News!

We’re thrilled to have launched the new TestBox website and TestBox 6.0! If you haven’t had a chance to explore yet, visit TestBox to discover updated documentation, powerful resources, and features that make testing more efficient than ever.

Maria Jose Herrera
Maria Jose Herrera
November 21, 2024
The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management


Opting for in-house database management involves more than just a salary. Here are some often-overlooked costs associated with maintaining your own DBA team.



1. High Salaries and Benefits


Hiring skilled DBAs is expensive. According to industry reports, the average salary of a DBA in the U.S. can range from $85,000 to over $130,000 per year, depending on experience and expertise. When you add ...

Cristobal Escobar
Cristobal Escobar
November 20, 2024
5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

ColdFusion has long been a reliable platform for building web applications, but like any technology, it requires maintenance and modernization over time. Whether you're using Lucee or Adobe ColdFusion, it’s critical to recognize the signs that your application is no longer meeting today’s standards in performance, security, and scalability. Let’s explore five clear indicators that it’s time to modernize your ColdFusion application and how ColdFusion consulting can help breathe new life into y...

Cristobal Escobar
Cristobal Escobar
November 19, 2024