I am new to ColdBox so please be understanding :)
In the documentation I found the option of setting a view from an external module in coldbox, by providing the "module" attribute.
When in my controller I set for example event.setView (view="test_view", module="contentbox"); I get the following error:
Application Execution Exception
Error Type: missinginclude : 0
Error Messages: Page //views/test_view.cfm [C:\(...path...)\slawek_contentbox\views\test_view.cfm] not found
It seems like coldbox is ignoring the module setting and is looking in the main views path \views\, but I would expect it to look inside \modules\contentbox\views\.
I would really appreciate if anyone would be able to help me with this issue!
Related
Please see attached screenshots and code if that makes it easier (at the bottom of this http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/sitefinity-8-2-to-9-upgrade-error#HlX3NsE3622pWP8AAERlJg post)
I have tried all the methods listed above and the workaround, but still keep getting the same issue.
This happens when I trigger changes(activate/deactivate) a module in Sitefinity/Administration/ModulesAndServices
The progress bar (green) goes into a loop and refreshing the page gives me this:
Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
1) If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method.
2) Ensure that you have not removed the component from the container via a call to RemoveAll().
3) Ensure you have not accidentally created more than one kernel.
And in the error logs for sitefinity I get:
Message : Error loading module 'YourPackage.YourModule' of type YourModule
Another module (of type YourModule) with the same name has already been loaded
Suggestions:
1) Ensure that you have not accidentally loaded the same module twice.
2) If you are using automatic module loading, ensure you have not manually loaded a module
that may be found by the module loader.
Have followed the article: http://docs.sitefinity.com/feather-use-constructor-dependency-injections
and the workaround too: https://github.com/Sitefinity/feather/issues/2580
Thanks in Advance
I have tried using creating a different module and attaching the ZfcUser\Form\Register over init method. But it wasn't working.
I want to add few custom fields, with changing any thing in the vendor dir, as is it not a good practice. I also tried using user_entity_class ,creating a custom 'User' class, but it was creating some route issue in other modules, with zfc-user , I'm also using zfc-admin and zfc-adminuser, the error was coming in zfc-adminuser, Couldn't found the class was the error.
Thanks in advance.
Well there are some issue regarding the overriding of the module ZFC-User, But still you can overwrite it manually.
One way I have used is a bit old fashioned but working. What I have done is I have copied complete module the to module folder. Then pointing the form towards to my module where the changes are required, rest all are pointed to default.With this you can update your module. Make sure you point the user_entity_class to your module something like this:
'user_entity_class' => 'MyZfcUser\Entity\User',
you can find this in config\autoload\zfcuser.global.php
I am trying to add Angular JS jQuery-File-Upload in my rails application.
To implement this, I am using
https://github.com/tors/jquery-fileupload-rails gem
Angular JS code from http://blueimp.github.io/jQuery-File-Upload/angularjs.html
Now when I tried to add a new file it is showing an error
Uncaught TypeError: Object # has no method 'scope'
Here I am adding screenshot of the response that I got on file uploading.
Can anyone help me to figure out the error?
Your "data" object clearly does not have any method "scope()". That's why the error. Are you trying to set some variable in "data" object to some angular "scope"? In that case double check, because there isn't any scope variable in 'data'. After you set it correctly you can either access it by data.scope, you don't need a method to retrieve it.
I ran into this same issue, and after spending a few hours on it, I can suggest simply copying the sources from the demo page instead of trying to use the sources as they are provided in the download package.
I have the same issue and after a few hours dig into my code, I found the problem was duplicate jquery.fileupload-angular.js files were included in my html page.
Remove the duplicated reference js file solved my problem straight away.
"'ErrorMessageResourceType' property specified was not found."
{"The resource type 'XXXX.XXXXXX' does not have a publicly visible static property named '_RequiredXXXX'."}
I'm getting this error when my Create.aspx view is called and steps over that line:
<%=Html.TextBoxFor(Function(model) model.NO_DEMND, New With {.class = "txtbox", .disabled = True})%>
<%=Html.ValidationMessageFor(Function(model) model.NO_DEMND)%>
The message is there in the Ressources file, I think the problem is deeper than that but i'm having a hard time finding it. It pops this error very early on the ASPX page. It's the first model component it goes thru, i tried removing this one and it's the same message for all the model.xxxx components. I guess it's an error somewhere in the linkage. The .EDMX is correct and I get no build errors, can anyone enlight me ?
Thanks alot
Tom.
Found the answer, turns out we had the same bug last year working on this project.
I'll add the answer for the sakes of knowledge and sO :-)
Right click on the affected Resources file to get the properties.
Set those values:
Build Action: Embedded Resource
Custom Tool: PublicResXFileCodeGenerator
Custom Tool Namespace: Resources
Hope it helps anyone in the near futur since it took me 4hrs to figure this out...
Tom.
Changing the build action property of my resource file to content resolved the error
#Html.RenderPartial(MVC.Shared.Views._Sorter);
throws error =>
There is no build provider registered for the extension '.spark'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: There is no build provider registered for the extension '.spark'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
Any ideas what might be wrong?
Adding this to web.config=>system.web=>compilation
<buildProviders>
<add extension=".spark" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
Forces app to build spark view as webforms view and produces ${Something.something} all around. So - what's an equivalent for spark viewengine?
Can you please try to make the following change to T4MVT.tt. In the method ViewsFolderInfo.AddView, change the line:
Views[viewFieldName] = GetVirtualPath(item);
to
Views[viewFieldName] = viewFieldName;
If that works well, we can just add a switch to the settings file that makes it do this instead of the default full path.
Let me know how that goes!
Note that MVC.Shared.Views._Sorter is just a constant with the path to the view. If you were to write this code without T4MVC, what exact string would you pass in there?
Maybe Spark has different requirements in the type of view paths it accepts here? If needed, we can tweak T4MVC to make this work, but I'd like to fully understand the Spark behavior outside of T4MVC first.