I'm trying to create an ical-file.
So I set Router::parseExtensions('ics') in router.php.
I created a folder ics in app/views/layouts and a default.ctp with this content
<?php
header('Content-Type: text/calendar');
echo $content_for_layout;
?>
In my reservationsController I created a ical() action and created a ical.ctp in /app/views/reservations/ics/.
So, if I'm trying to access http://localhost/reservations/ical/1.ics I get an error:
Error: The view for ReservationsController::ical() was not found.
Error: Confirm you have created the file: C:\xampp\htdocs\ers\app\views\reservations\ical.ctp
So I'm a bit confused about the error-message. Why does it search the ical.ctp in app\views\reservations\ and not in app\views\reservations\ics\?
When I'm using another extension like .xml the error message looks like this:
Error: Confirm you have created the file: C:\xampp\htdocs\ers\app\views\reservations\xml\ical.ctp
Why does xml work and ics don't? What went wrong?
I've just finished dealing with this situation myself. I'd been trying to get a csv extension to display, and I was also getting the "missing view" error.
Everything was in place; I had my /app/views/layouts/csv/default.ctp and /app/views/users/csv/export.ctp view files set up. I had Router::parseExtensions('csv'); at the top of my /app/config/routes.php file.
Turns out, what I had forgotten was to add the RequestHandler component to my controller's components array: var $components = array('RequestHandler');.
Once I did that everything worked perfectly.
So if you've stumbled upon this question because you're having the same issue, check to be sure you're loading the RequestHandler component fixes things for you...
I just had the same trouble creating the ics example # http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2
Needed quite a while to figur out that this seems to be a cake bug and opend a ticket for it :)
http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2565-cakeresponse-is-missing-icalendar-and-not-responding-as-documented
Hopefully this will be resolved soon.
PS: I also posted a workaround / quickfix for this until it is fixed in the core.
Related
I want to use coc.nvim and elrang_ls in vim8.2. There are some problems. It report missing an erlang_ls.config when I open a erlang file. But i have erlang_ls.config in project root.
the result of CocCommand workspace.showOutput show it read config from unexpected place
Where is correct position for erlang_ls.config?
Sorry for my poor English. Thanks.
It is possible to customize the behaviour of the erlang_ls server via
a configuration file, named erlang_ls.config. The erlang_ls.config
file should be placed in the root directory of a given project to
store the configuration for that project.
According to the picture, the clue has already been given to you. In the els_config.erl file consult_config function, line 126. error type = 2.
I think the information is enough, you can find source code file and read it and find why?
It is need create erlang_ls.config in C:\Users\Administrator\AppData\Roaming\erlang_ls and erlang_ls.config erlang_ls.yaml in the project root path. But I don't know why.
I'm working on prestashop and I'm Trying to override "order detail page" in front (customer's details orders).
This is how I did :
I copied file \controllers\front\OrderDetailController.php into folder \override\controllers\front\OrderDetailController.php
I copied also default template file order-detail.tpl into folder override/customtemplate/order-detail.tpl
And In OrderDetailController.php I have specified template directory like that
$this->setTemplate(_PS_OVERRIDE_DIR_ . '/themes/parfum_evo/order-detail.tpl');
I tried, it works fine except translations. Even watching the documentation, no test solution seems to work.
Could anyone help me? Thank you in advance :'(
The php override sits in the correct place. As for the other, you specified the path the override/customtemplate/order-detail.tpl but then placed it in override/themes/parfum_evo/order-detail.tpl. I take it as customtemplate is farfum_evo really, but you need to add another one named themes, after override, using that structure. I think. Because there is a hook named
DisplayOverrideTemplate
Which should take care of this, while I believe setTemplate for controllers will always grab from the main theme folder
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 have the MvxBindingAttributes.xml in my UI.Droid/Resources/Values but everytime I try to use the bindings in my layouts I get
Warning attribute is not declared.
No resource identifier found for attribute 'MvxBind' in package
'DroidUI'
so for some reason it cannot find those attributes. I have tried to close/reopen/clean/rebuild with no luck, tried removing the layouts and then building (Hoping it would add them at build) and then try to add them again, but nothing seems to work
Have you checked that the MvxBindingAttributes.xml file is marked in properties as an AndroidResource?
VisualStudio likes marking the xml files as content or none instead - especially if you've added the MvxBindingAttributes.xml file as a link.
As an update to this, you can also now use a special 'auto' xml scheme:
xmlns:local="http://schemas.android.com/apk/res-auto"
In the project properties, add a Android Manifest file and add a package name that contains at least two periods, for example:
com.DroidUI
In the axml file, type the package name instead of the namespace:
xmlns:local="http://schemas.android.com/apk/res/com.DroidUI
xmlns:local="http://schemas.android.com/apk/res-auto
Fixed it for me.
First, thanks for the answer. I had the same problem.
But in my case, attempting to use the suggestions above failed. or at least that is what i thought.
When i used local:MvxItemTemplate=#layout/My_Manifest while i had the My_Manifest.axml file correctly placed in Layout folder, and correct xml schemas, it still had problems.
But, when i changed My_Manifest to my_manifest while leaving the actual file name as My_Manifest.axml, everything was working.
just wanted to share
In my case for some reason the MvxBindingAttributes.xml file existed, but hadn't been included in the project. Right-clicking on MvxBindingAttributes.xml and choosing "Include in Project" sorted the problem for me.
Just in case: You might also have rubbish (in my case, it were dots) in some of your XML. But the error pointed "Maybe there's something wrong with the auto-generated XML lol" so it took me half an hour to notice it... Sigh!
"'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