Freemarker reference theme.properties in template - properties

I am very new to this and have to migrate an existing web app (that I do not know much about) to Weblogic (12.2.1.4). I had to upgrade the version of struts (2.0.11.2 --> 2.3.1) which also came with a newer version of Freemarker (2.3.8 --> 2.3.18).
The template directory has subdirectories for the different themes.
Under ajax for example I have a file theme.properties containing this line:
parent=xhtml
A head.ftl then contains this include:
<#include "/${parameters.templateDir}/${themeProperties.parent}/head.ftl" />
However this throws the following error in the browser:
The following has evaluated to null or missing:
==> themeProperties.parent [in template "template/ajax/head.ftl" at line 2, column 41]
I believe this was working on the old server.
Is there some new way or syntax to reference the content of that properties file?

It seems like replacing
${themeProperties.parent}
with
${parameters.expandTheme}
seems to work

Related

How to work with mulitple annotation folder in latest version of darkaonline/l5-swagger?

It was working perfectly with multiple annotation folders in laravel 8.0, forgot the minor version of l5-swagger. Later when I do composer update and darkoline get updated to ^8.3 version. Now, its trying to make documentation(#SchemaRef) out of each file stored inside the folder. I do have following configuration
/*
* Absolute paths to directory containing the swagger annotations are stored.
*/
annotations' => [
base_path('app'),
base_path('Modules'),
]
In my case I do have following error
ErrorException
Skipping unknown \CreateRolesTable
Here CretaetRolesTable is a migration file inside Modules folder, no swagger related annotation exists in CreateRolesTable file and neither this name is being used as #ref.
You should use the anonymous function in CreateRolesTable file.
return new class extends Migration
For more information check the official documentation.(see more)

breezejs: error when minifying the script

I'm facing an issue when minifying breezejs :
Error : Cannot get property « Validator » of a null reference
(that's not the exact message but a translation of the original.)
This is happening when I try to call breeze.Validator, meaning breeze is undefined.
Now, I rely on ASP.NET MVC bundling mechanism for minifying the file breeze.debug.js along with all the other scripts in my application.
However, if instead of using breeze.debug.js I use breeze.min.js (the one provided by Breeze team), then it works fine.
What could be the reason for this problem ?
I've solved the problem by ignoring the breeze.debug.js file when in release mode and by ignoring the breeze.min.js file when in debug mode:
bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
bundles.IgnoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
bundles.Add(new ScriptBundle("~/bundles/breeze").Include("~/scripts/libs/breeze/breeze.debug.js")
.Include("~/scripts/libs/breeze/breeze.min.js"));

XUL standalone application not starting

I recently took on a project built on XUL (standalone, using xulrunner) - However I can't get it to properly run.
I'm getting this error when I attempt to start it using the command line (xulrunner.exe ../application.ini -jsconsole):
No chrome package registered for chrome://case_scenario_builder/content/case_scenario_builder.xul
The chrome.manifest file looks like this:
content case_scenario_builder file:chrome/case_scenario_builder/content/ contentaccessible=yes
content jslib jar:chrome/jslib.jar!/
skin case_scenario_builder skin file:chrome/case_scenario_builder/skin/
locale case_scenario_builder en-US chrome/case_scenario_builder/locale/en-US/
Any ideas on where I could start debugging?
I figured it out!
In case anyone else runs into this as well:
It was due to the caching system in place by default and the use of .jar containers instead of folders.
The XUL environment had cached both JS and XUL files - and even after disabling those, I had to extract everything that was in the .jar file to the content folder and update the chrome.manifest file.
Thanks for your suggestions on debugging! - they helped the process.
I guess your manifest just isn't getting loaded. To test that I'd introduce an intentional syntax error and check the error console. E.g. if you put
asdfasd
on its own line, you should get a Warning: Ignoring unrecognized chrome manifest directive 'asdfasd'. in the Error console.
(Note to other experts: initially I wanted to suggest dropping 'file:' prefix and avoiding underscores in the package name, but I tested it on a Firefox nightly, and it works fine.)
Your chrome package clearly didn't get registered. From what I can tell, the reason is the bogus file: prefix, you should drop it when specifying relative paths:
content case_scenario_builder chrome/case_scenario_builder/content/ contentaccessible=yes
Btw, I suspect that you copied contentaccessible=yes from somewhere - you should drop it as well unless you know what it does.

Activate Visual Web Part Package in Share Point 2010

I have created a new project of SharePoint 2010 --> Visual Web part,
seleted it as form solution. and it created the web part.
I just edited it with Hello World! for confirmation and deployed it using VS, and successfully added to page.
problem, arrises when i activated the same package after uploaded it from site actions--> site settings --> galleries --> Solutions
-- > upload new solution --> activate it.
error came:
This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'GUID' failed validation, file manifest.xml, line 14, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'
I don't know why VS didn't get this error while its deployment or i am missing some thing while my deployment.
any idea?
Try to make your visual web part as sand boxed solution your problem will be resolved

MonoDevelop and AjaxControlToolkit: Register Server Tag in Mono

I know that Mono supports the AjaxControlToolkit but I don't know how to integrate it into MonoDevelop. I added AjaxControlToolkit.dll, System.Web.Extensions.dll and System.Web.Extensions.Design.dll as References in the project but when I build the project I get the warning:
/Users/user1/Projects/FirstProject/Default.aspx(1,1): Warning: Parser failed with error The tag type 'ajaxToolkit:TabContainer' has not been registered.. CodeBehind members for this file will not be added. (FirstProject)
and I when I deploy it I get the error: Unknown server tag 'ajaxToolkit:TabContainer'.
How do I register the server tag in MonoDevelop?
You can use either the <%#Register directive, or add some lines to your Web.config. See here for instructions on either approach.
Using the Web.config mechanism has the advantage that you don't need to add a directive to every page where you want to use the controls.