[coldbox-3.8.1] event.setView ignores module

I have a custom module I am building that uses custom content that extends the baseContent class of ContentBox 2.1.0. Any event that I try to set the view (setView) to an event in another module (often contentbox-admin) fails to point to the foreign module. Instead, setView always points to the root of the ContentBox site (which is two folders down from the wwwroot within inetpub: “intepub/wwwroot/client/folder/”).

This happens regardless of how I try to set the view:

  • event.setView(view="/versions/index", module=“contentbox-admin”);

  • event.setView(view=“versions/index”, module=“contentbox-admin”);

  • event.setView(view=“contentbox-admin:versions/index”);

What the include set in setView should be: [site-root]/cbadmin/views/versions/index.cfm
What I get instead is: [site-root]/views/versions/index.cfm

Checking the value from getCurrentView() and getCurrentViewModule() show that the object has indeed been set. It’s just ignoring the module concept all together and looking in the root. But while setView does not work, renderview accurately points to the foreign module as expected. So the problem is only with setview.

I’m guessing I have something set incorrectly somewhere as this would seem to be a major impediment to module developers.

Thanks in advance.

John

I’m still in need of assistance on this and it is really killing my work at the moment. I have a huge deadline next week and I can’t get this core functionality to work. Anybody have any ideas?

As noted, the event’s view and module properties are indeed changed by setView(), but when the page renders it looks in the site root rather than the event’s module.

When I implement renderView() directly (specifying a different module), I have no problems. It’s only when using setView();

For those coming across this post, the problem was specific to contentbox and the discussion about how to deal with it is ongoing.

See https://groups.google.com/forum/#!topic/contentbox/V5G9ybtZ8uY.