Has anybody here used ContentBox 5 CMS? I am makin...
# cfml-general
j
Has anybody here used ContentBox 5 CMS? I am making a website for the Hawaii ColdFusion user group, and I want to have a CMS that I can use to have a website and a blog, but don't want to use WordPress as I want it ColdFusion-based. I, just want something simple to maintain the site.
y
We have sites running on ContentBox 4, Need to upgrade to 5. How can I help?
j
@Yogesh Lucid what has your experience been with ContentBox CMS, is it easy to install and set up? I am just trying to make a simple site for the user group, but I have no experience with MVC frameworks.
y
Yes, ContentBox is easy to install and use. There are some plugins available on https://www.forgebox.io/type/contentbox-modules, but you cannot compare it with Wordpress as its community and availability of plugin is vast.
b
I’ve used ContentBox 3 and built modules on top of it, it’s pretty easy to use. I haven’t had time to look at Contentbox 5 yet though. But i can only assume it’s just as easy to use with more features such as multi-sites.
b
@johnbarrett I use ContentBox for my personal sites (which don't have tons of recent content, lol) • codersrevolution.combradwood.compi.bradwood.com <- This one runs on a Raspberry Pi! And Ortus uses it for several of our sites: • ortussolutions.comluismajano.com
It's very extensible and we've even written client sites around ContentBox by building modules on top of it, in the same way people will build "Wordpress sites" on top of WP
j
@bdw429s I just tried to install using box, but I get a Error in executing the DDL.. What does this mean? I checked in the Application.cfc, and the datasource is correct. Did I do something wrong? I am trying to use MySQL as the database, and using localhost on my Mac.I have java 17 installed.
b
You may need to adjust the orm db type in the Application.cfc
That error is just a generic orm error
Check the this.ormsettings
j
@bdw429s thanks so much for your help! I added MySQL in this line
Copy code
// THE DIALECT OF YOUR DATABASE OR LET HIBERNATE FIGURE IT OUT, UP TO YOU TO CONFIGURE.
        dialect                 : request.$coldboxUtil.getSystemSetting( "ORM_DIALECT", "MySQL" ),
Now I get a Null Pointer Exception
b
@gpickin @lmajano Can one of you help @johnbarrett with getting ContentBox CMS up for the Hawaii CF user group site?
@johnbarrett You'll need to include much more information than just saying "Now I get a Null Pointer Exception". That's not nearly enough information to help you since that's a super common error which can mean about anything. Always include the full stack trace at minimum
ContentBox uses CF's Hibernate which works well once it's set up, but can be a little tricky to get configured sometimes.
Also, when you say
I added MySQL in this line
what do you mean by that. Do you mean you replaced the
request.$coldboxUtil.getSystemSetting( "ORM_DIALECT", "MySQL" )
bit with a hard coded "mysql" value?
Also, are you running this server with CommandBox?
If not, your environment variables probably aren't created properly, thus the NPE. We reallyk need more info here on how you've started the server and what's in your
.env
file, etc.
j
@bdw429s yes the MySQL was hard corded and I got the null pointer error, then I took it out, restarted the server, but still get the Null pointer error. The code is back to default.
Copy code
this.ormSettings = {
        // ENTITY LOCATIONS, ADD MORE LOCATIONS AS YOU SEE FIT
        cfclocation           : [
            // If you create your own app entities
            "models",
            // The ContentBox Core Entities
            "modules/contentbox/models",
            // Custom Module Entities
            "modules_app"
        ],
        // THE DIALECT OF YOUR DATABASE OR LET HIBERNATE FIGURE IT OUT, UP TO YOU TO CONFIGURE.
        dialect                 : request.$coldboxUtil.getSystemSetting( "ORM_DIALECT", "" ),
b
@johnbarrett Please see my other questions I asked
98% of the time I see an NPE in this sort of scenario it's from blank env vars where the JDBC class or something is missing.
We need the full stack of the error and all the details I asked about above concerning how you're starting and configuring your server
j
I have no environmental variables. Yes, I am running the server with CommandBox. here's the full error stack. The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Copy code
Null Pointers are another name for undefined values.
 
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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Remote Address  	127.0.0.1
Referrer  	<http://127.0.0.1:59464/>
Date/Time  	01-Feb-22 09:40 PM
Stack Trace


java.lang.NullPointerException
	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXConnector$1.getPublicId(StAXConnector.java:101)
	at org.apache.xerces.util.SAXLocatorWrapper.getPublicId(Unknown Source)
	at org.apache.xerces.xni.parser.XMLParseException.<init>(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
	at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source)
	at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
	at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXEventConnector.handleStartElement(StAXEventConnector.java:261)
	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXEventConnector.bridge(StAXEventConnector.java:130)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:460)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:435)
	at org.hibernate.boot.jaxb.internal.AbstractBinder.jaxb(AbstractBinder.java:171)
	at org.hibernate.boot.jaxb.internal.MappingBinder.doBind(MappingBinder.java:61)
	at org.hibernate.boot.jaxb.internal.AbstractBinder.doBind(AbstractBinder.java:102)
	at org.hibernate.boot.jaxb.internal.AbstractBinder.bind(AbstractBinder.java:84)
	at org.hibernate.boot.jaxb.internal.JaxpSourceXmlSource.doBind(JaxpSourceXmlSource.java:29)
	at org.hibernate.boot.MetadataSources.addDocument(MetadataSources.java:409)
	at org.hibernate.cfg.Configuration.addDocument(Configuration.java:462)
	at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:647)
	at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:213)
	at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:186)
	at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:68)
	at coldfusion.orm.hibernate.HibernateProvider.initializeORMForApplication(HibernateProvider.java:168)
	at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:77)
	at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:819)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:433)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:231)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at runwar.Server$1.handleRequest(Server.java:510)
	at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:280)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:260)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852)
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
	at java.base/java.lang.Thread.run(Thread.java:829)
b
I have no environmental variables
@johnbarrett This seems problematic then if you have code like this still in place:
Copy code
request.$coldboxUtil.getSystemSetting( "ORM_DIALECT", "" )
because that's explicitly looking for an env var called
ORM_DIALECT
and will default to an empty string if it doesn't find it.
Also, when you say you have no environment variables, did you run debugging such as looking at the output of the
env show
command in CommandBox from the root of the project, which will read in your
.env
file (assuming you have
commandbox-dotenv
installed) or are you just guessing that you don't have any since you didn't configure them yourself?
The error isn't coming from JDBC as I had suggested, but instead from some sort of Hibernate XML validation-- probably due to bad ORM settings is my guess.
What version of ColdFusion are you running this on?
j
I am running ColdFusion 2021 on localhost. I just reinstalled using commandbox, and I am back to the DDL error. I think that it's something to do with MySQL 8, I have debugging turn on, and don't see any information about env variables. The error says I have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' do I have to create the database to use MyISAM?
b
@lmajano Please assist
j
thanks so much, @bdw429s!
b
@lmajano
l
Hi @johnbarrett we usually check discourse our our jira issues for following up on assistance
slack is great but we don't usually follow up like we do when we have an actual jira issue or discourse
how can I assist
j
@lmajano thanks so much for your help. I was trying to get ContentBox Modular CMS working so I can use it for the Hawaii ColdFusion group. I had some big problems trying to get it installed. I just tried to reinstall and I get the DDL error, and if I hard code MySQL in the Application.cfc I will get a null pointer exception. At least that is what happened last time. I will like to use this CMS to manage the user group that I run. Thanks so much!
b
@johnbarrett Could you please summarize the error you're receiving in a post on our Community Forum. I think Luis will be able to track the conversation better there
l
Can you open a thread in the community @johnbarrett We have an installer CLI, did you follow the installer?
j
I have a hard time posting the error in the Ortus Solutions Community. Where do I post the problem?
b
@johnbarrett When you say "having a hard time" what do you mean?
Did you get an error?
An unexpected result?
I see you just commented on a thread, so it seems you're able to post just fine
You'll need to be more specific
j
@bdw429s I just posted a new thread, it took a little while to figure out. I hope the link to the site is good, as I get a long, nasty error. http://cfahwaii.net/index.cfm Hostek says it only works with Lucee, is this true?
b
I replied there 🙂