I'm getting this error trying to create a .phtml template.
1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'CleverSoft_Base::images_dimensions_chart.phtml' in module: '' block's name: 'magento\framework\view\element\template_0'
I don't understand the two :: after CleverSoft_Base what does those two dots stand for and what should be the path in my child theme for the overwrite?
If you're overwriting a template your have to set your own module
Vendor_Module::images_dimensions_chart.phtml
the base-path for frontend templates in your module is always Vendor/Module/view/frontend/templates
Related
I tried to edit the core file form\Resources\Private\Frontend\Partials\Field\Field.html to change the html output in the frontend. If I change that file, it has not effetcs. If I change the core file form\Resources\Private\Frontend\Partials\Textarea.html it effects the output in the frontend.
I've tried to set a custom partial, layout and templates folder like this:
I've set the following in the setup part of the page template:
plugin.tx_form {
settings {
yamlConfigurations {
# register your own additional configuration
# choose a number higher than 30 (below is reserved)
100 = fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml
}
}
}
In fileadmin/my_site_package/Configuration/Form/CustomFormSetup.yaml I have
TYPO3:
CMS:
Form:
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
20:'fileadmin/my_site_package/Resources/Private/Templates/Form/Frontend/'
partialRootPaths:
20: 'fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/'
In the folder fileadmin/my_site_package/Resources/Private/Partials/Form/Frontend/ I have the copied Multicheckbox.html and the other copied partial files from the form core folder. I have edited the Multicheckbox.html, but it has not effects to the frontend.
Thank you so much for your input. The problem was because of the bootstrap package. There was a file Multicheckbox.html in the folder "typo3conf/ext/bootstrap_package/Resources/Private/Partials/Form". This one overrided the core file Multicheckbox.html
But what am I doing wrong in my steps? I'm getting now the following error in the frontend:
Oops, an error occurred!
Tried resolving a template file for controller action "FormFrontend->form" in format ".html", but none of the paths contained the expected template file (FormFrontend/Form.html). No paths configured.
More information regarding this error might be available online.
Did I set the paths in CustomFormSetup.yaml wrong?
I've also tried
TYPO3:
CMS:
Form:
prototypes:
standard:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
1:'/my_site_package/Resources/Private/Templates/Form/Frontend/'
partialRootPaths:
1:'/my_site_package/Resources/Private/Partials/Form/Frontend/'
with the same error.
I am trying out a Hugo theme and what happened was when I used the command hugo server, I see the following error message.
Building sites … WARN 2020/07/20 14:33:07 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url
ERROR 2020/07/20 14:33:07 render of "taxonomy" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: taxonomy/list.html:7:3: executing "taxonomy/list.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
ERROR 2020/07/20 14:33:07 render of "home" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: index.html:7:3: executing "index.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
Built in 100 ms
Error: Error building site: failed to render pages: render of "taxonomy" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: taxonomy/list.html:7:3: executing "taxonomy/list.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
It seems saying that I misplaced some of the template files. I wonder if I have installed the theme correctly, or something I misunderstood?
What I have Done
Installed hugo and confirmed it is installed.
Created a new site called my-conf (Just trying out) and the themes directory.
I've cloned the repository into my themes directory. I am using GitHub Desktop on Windows.
Added the theme information using theme = "devfest-theme-hugo".
Used the command hugo server.
Ideally, you would add the themes as a submodule, as in the documentation, and the theme page itself:
hugo new site my-conf
cd my-conf
mkdir themes
git submodule add https://github.com/GDGToulouse/devfest-theme-hugo.git themes/devfest-theme-hugo
And add it to your configuration (which you seem to have done):
echo 'theme = "ananke"' >> config.toml
Then, regarding readFile:
To use the readFile function in your templates, make sure the path is relative to your Hugo project’s root directory:
{{ readFile "/content/templates/local-file-templates" }}
In the template: layouts/_default/baseof.html seems to have the right path.
Yet, looking at the history of GDGToulouse/devfest-theme-hugo/layouts/_default/baseof.html, I see it has changed during a commit "WIP 2020".
The version before that commit included:
{{ readFile "themes/devfest-theme-hugo/static/icons.svg" | safeHTML }}
Which, from the discussion, seems to work better!
I am creating a helm chart in which I want to specify a default for a value using a template function. Specifically I want to either use the override value image.name, or default to the template function chart.name:
{{ .Values.image.name | default include chart.name . }}
But when linting the chart I have the following error:
[ERROR] templates/: render error in "chart/templates/deployment.yaml": template: chart/templates/deployment.yaml:22:81: executing "chart/templates/deployment.yaml" at <include>: wrong number of args for include: want 2 got 0
Is it possible to use an included template function as the default value? Or can I only use literals?
You can. Just enclose your include statement in parentheses:
{{ .Values.image.name | default (include "chart.name" .)}}
Please see using the default function
I have gridelements (the dev branch for 8.x.x) with 8LTS (+ fsc) and ext:form brought to work. Both seem to work for themselves. However, if I place a form element in a gridelement container ... I get the following error message when I want to send the form:
Oops, an error occurred!
The given string was not appended with a valid HMAC.
Anyone an idea what causes this? The other CE elements seem to work in the grid.
the Grid Configuration for all * CE is allowed in the defined container:
Name: Column #1
Column number: 10
Allowed CE: *
Allowed Grids: *
And in Log:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1320830018: The given string was
not appended with a valid HMAC. | TYPO3\CMS\Extbase\Security\Exception\InvalidHashException
thrown in file /is/htdocs/www/typo3_src-8.7.4/typo3/sysext/extbase/Classes/Security/Cryptography/HashService.php
in line 94.
Requested URL: .../contact/?tx_form_formframework%5Baction%5D=perform&tx_form_formframework%5Bcontroller%5D=FormFrontend&cHash=c81ac6ed1b41sdfgsdg71fsdfb44584e7
Debug shows:
TYPO3\CMS\Extbase\Security\Exception\InvalidHashException thrown in file
/is/htdocs/.../www/typo3_src-8.7.4/typo3/sysext/extbase/Classes/Security/Cryptography/HashService.php in line 94.
19 TYPO3\CMS\Extbase\Security\Cryptography\HashService::validateAndStripHmac("a:1:}ac4293effb593e4b063cbfcc6fc2c1e2c0c650a1")
/is/htdocs/.../www/typo3_src-8.7.4/typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php:
00124: }
00125:
00126: $serializedTrustedProperties = $this->hashService->validateAndStripHmac($trustedPropertiesToken);
00127: $trustedProperties = unserialize($serializedTrustedProperties);
00128: foreach ($trustedProperties as $propertyName => $propertyConfiguration) {
...
I've been able to get JSDoc3 working with the default template, however, when I try to run another template (even the one that comes with it,haruki) I get the following error:
js: "/path/to/jsdoc/jsdoc.js", line 308: exception from uncaught JavaScript throw: Error: Unable to load template: Module "haruki/publish" not found.
I've tried several other templates and get the same thing. Goven my freshman status with JSDoc I'm assuming it's some config or call issue that's tripping me up.
try to set full path to template folder with publish.js file (not only template name)
for example command line parameter
-t templates/docstrap-master/template
or in config.json file
{ ...
"opts": {
...
"template": "templates/docstrap-master/template"
}
}
it works for this https://github.com/terryweiss/docstrap
for Haruki it seems to work too ./jsdoc -c conf.json -t templates/haruki but i have another error:
This template only supports output to the console. Use the option "-d
console" when you run JSDoc.
With -d console it prints result to console