Using DevExtreme & Devexpress Report & Asp.Net Zero together - devexpress

As Described HERE AspNetZero can use Devexpress reporting. Also, we used devextreme in our solution before this.
But when I run the application I got two errors!
SampleReport:1213 Uncaught ReferenceError: ko is not defined
at SampleReport:1213:81
at SampleReport:1215:488017
And Also :
E0024 - DevExtreme bundle already included
For second problem: I know that we used "~/js/devextreme/dx.all.js" in _Layout.cshtml , then I deleted reference from below section :
{
"output": "view-resources/Areas/App/Views/_Bundles/sample-report.min.js",
"input": [
"node_modules/jquery-ui-dist/jquery-ui.js",
"node_modules/knockout/build/output/knockout-latest.js",
"node_modules/devextreme/dist/js/dx.all.js", <== Deleted this line
"node_modules/#devexpress/analytics-core/dist/js/dx-analytics-core.js",
"node_modules/devexpress-reporting/dist/js/dx-webdocumentviewer.js"
]
}
But After that I got :
The DevExtreme library is missing. Check whether a script is included on the page
As you can see with reference I got "already included" error and without reference I got "library is missing" error !!!!
Any Help for these errors is appreciated.

Related

Console Error for woocommerce_shared_settings deprecation

I am working with WooCommerce for the first time and I am currently implementing WC filters on the shop page. The filters show up but are not functional, and the console is throwing the following errors:
ERROR 1: woocommerce_shared_settings filter in Blocks is deprecated. See https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/docs/contributors/block-assets.md
ERROR 2: deprecated.min.js?ver=932d8bb37da8bbb396a7a3f754345e08:2 select control in #wordpress/data-controls is deprecated since version 5.7. Please use built-in resolveSelect control in #wordpress/data instead.
The errors disappear when I remove the filters.
I have located the file where the deprecated code exists. I also read the WC docs about how to fix the issue and it presented this code:
use Automattic\WooCommerce\Blocks\Package;
use Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry;
Package::container()->get( AssetDataRegistry::class )->add( $key, $value )
It doesn't say where to put this code, though. Where should I put it to solve this issue?
I have the same problem.
Which is the file you located?
Here also says you have to add, on the "client side", this code:
wc.wcSettings.getSetting( 'key' );

Deploying Microsoft.Maps/account

I have used an ARM Template to deploy a Microsoft.Maps/account resource to Azure.
That was successful:
Resource Microsoft.Maps/accounts 'nzmoebasedemo0000bt' provisioning status is succeeded
I'd like to retrieve the Primary key generated, within the ARM template, in order to persist it to a KeyVault.
I looked in https://resource.azure.com but the Maps/account provider was not listed, so could find no hint as to what property to read.
I tried:
[listKeys(resourceId('Microsoft.Maps/account', 'parameters('keyVaultVaultSecretMapsAccountResourceName')'), providers('Microsoft.Maps', 'account').apiVersions[0]).keys[0].value]"
Abd got back:
#{parameters=; status=Trial run failed. ; outputs=; provisionStateSucceeded=False; deploymentOutput=; errorCode=InvalidTemplate; errorMessage=Deployment template validation failed: 'The template resource 'azure.arm.base.keyVault.vault.secret' at line '168' and column '9' is not valid: Unable to evaluate template language function 'providers': function requires the second argument to be a multi-segmented resource type excluding the resource provider namespace. Invalid function argument 'account'. Please see https://aka.ms/arm-template-expressions/#providers for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'.}
Which in this case...seems incorrect.
What am I not seeing/getting?
Thanks!
Edit:
As per suggestion given, the following did pass a test run.
"[listKeys(resourceId('Microsoft.Maps/account', parameters('keyVaultVaultSecretMapsAccountResourceName')), '2018-05-01').keys[0].value]"
But when actually run, got the following:
1:02:35 AM - Resource Microsoft.Maps/account 'nzmoebasedemo0000bt' failed with message '{
"error": {
"code": "InvalidResourceType",
"message": "The resource type could not be found in the namespace 'Microsoft.Maps' for api version '2018-05-01'."
}
}'
Edit again:
As per guidance given in the comments, the following works! (after correcting api version, spelling mistake, and using 'primaryKey' property:
"[listKeys(resourceId('Microsoft.Maps/accounts', parameters('keyVaultVaultSecretMapsAccountsResourceName')), '2018-05-01').primaryKey]"
So the problem was due to a typo, the provider\resource is Microsoft.Maps/accounts

How to use PrimeNG with Angular in aspnetcore-spa template

You know, I spend more time just trying to get things set up to work with Angular than I do actually developing with Angular. There must be an easier way... :(
Currently, I am using the aspnetcore-spa template, creating a project with the command "dotnet new angular" - this is version 1.0.3, which adds Angular 4.1.2 to the npm dependencies. This works great to get a project running quickly. But now I want to add PrimeNG to take advantage of their form controls. I have been struggling with this all day, and would love it if anyone could provide some assistance.
Here is what I have done in my current effort (the latest of many, starting fresh each time):
1) Added to the package.json file: "primeng": "4.1.0-rc.2"
2) Added 'primeng/primeng' to the webpack.config.vendor.js file's vendor collection.
3) Added the following to my test module (which is in turn referenced in app.module.shared.ts so I can route to it via my RouterModule):
import { FileUploadModule } from 'primeng/components/fileupload/fileupload';
And in the html for the module, in an attempt to use the file uploader control, I have (from their site - https://www.primefaces.org/primeng/#/fileupload):
<p-fileUpload name="myfile[]" url="./upload.php"></p-fileUpload>
4) ran "webpack --config webpack.config.vendor.js" from a command prompt at the root of the project folder, which completed with no errors.
Then I hit F5 to run the project, and I got this error:
Exception: Call to Node module failed with error: Error: Template parse errors:
'p-fileUpload' is not a known element:
1. If 'p-fileUpload' is an Angular component, then verify that it is part of this module.
2. If 'p-fileUpload' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '#NgModule.schemas' of this component to suppress this message. (" type="button" (click)="onclick()" class="ui-button-info" label="Click Me">Click Me</button>-->
So, in an effort to comply, I added a reference to the ngprime module to the app.module.shared.ts file, like this (I don't really know how I should reference the module...):
import { FileUploadModule } from 'primeng/primeng';
But got the same exact error.
What am I missing???
Any help would be most appreciated.
I finally have this working, using the asp-prerender-module to get server-side rendering, and not having to rely on the asp-ng2-prerender-module (see my last comment). The trick, I found, was to reference the FileUploaderModule in the app.module.shared.ts file like this:
import { FileUploadModule } from 'primeng/components/fileupload/fileupload';
rather than like this:
import { FileUploadModule } from 'primeng/primeng';
The reason this matters is that the latter method of referencing will load all other components as well (see explanation here: https://www.primefaces.org/primeng/#/setup), and SOME of the PrimeNG components can not be rendered on the server due to DOM-related references (things like "window", which do not exist on the server). See the discussion here for more on this: https://github.com/primefaces/primeng/issues/1341
This change, combined with the other steps listed in my answer and, of course, actually referencing the directive in app.module (thank you #pankaj !) made everything work correctly at last. Only took me about 7 hours to figure it out. :(

Either 'GDI', 'WPF' or 'SILVERLIGHT' must be defined how to remove this error?

I have been working on a project in Visual Studio, C# language and I found an error described above. How can I remove this error?
"Either 'GDI', 'WPF' or 'SILVERLIGHT' must be defined"
Open the project properties for the project that throws the error (Alt+Enter in VS Solution Explorer), go to the Build tab and enter the symbol you want into the "Conditional compilation symbols" field. Enter one of the three values.
It seems the value got lost. I cannot tell you which value got lost. Check one of the other PDFsharp projects (I hope not all projects lost their symbols).

Tridion UI 2012 - Error "The item tcm:280-29837-64 does not exist."

When we are trying to create a new page through a PageType in Tridion UI.It is throwing below error --
"The item tcm:280-29837-64 does not exist."
Is it the Id of the page which i want to create,as it is no more exists in the tridion?
Could any body help me out in this regard ?
Note :-we defined the pagetype to those pages which already exist and published.
Edit-1 When we click on the 'Create Page' button(see the attached screenshot), above mentioned error Pops up.
In the cd_core.log file below error and warning comes --
ERROR XMLConfigurationReader - Error while validating file 'cd_ambient_conf.xml' with schema 'schemas/cd_ambient_conf.xsd'. cvc-complex-type.2.4.a: Invalid content was found starting with element 'ClaimStoreProvider'. One of '{Cookies}' is expected.
WARN AmbientDataContext - There is no current ambient data context - the ambient data framework is not properly initialised
Edit-2 Now errors related to AmbientDataWork are resolved but we are still getting same issue. There are two options in UI (a) "New Page" (b) Create and insert Content. This error also comes when we go with the option "Create and Insert Content". On each click of "Create Page" or "Create and insert Content" it generate a new Id(XXX-59248 -64 then XXX-59249- 64 etc) for page and same way for component also and throws above mentioned error message.
Note:- We are using IIS 6.
Edit-3 - I am using VB script in my page templates.
If someone is using VB script page template,it is required to install UI_2012.0.0.81248 hotfixes to create new pages in UI 2012.
I was not aware about this so fact of using VB script is not mentioned anywhere in the question .So I am updating my question again to assist community member in right direction.
It "looks like" the creation of the page somehow fails on the CM side (but i'm doing an awful lot of interpretation here based on very limited data...).
Can you verify
1. that you can create pages in the content management explorer in the publication with ID 280
2. that your blueprint context settings for UI 2012 are correct (should the new page/component be created in the publication with ID 280?)
3. that you have no workflow or event system interfering with the creation of the page
I would also expect an event log entry in the Tridion/Tridion Content Manager event log which would contain a detailed stack trace...

Resources