I am using faryshta/yii2-disable-submit-buttons extension for disabling submit buttons when submitting a form in yii2.
I installed the extension using composer and I entered 'faryshta\assets\ActiveFormDisableSubmitButonsAsset', in $depends property in AppAsset file which is required.
But there is error as:
ReflectionException Class
faryshta\assets\ActiveFormDisableSubmitButonsAsset does not exist
Related
I'm trying to use Material Custom Component and also using some other components. But I have version conflict Uncaught DOMException.
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mwc-icon" has already been used with this registry.
Currently, I'm using the yarn package manager to handle custom-component versions.
Somewhere in your code, you're trying to register the same custom element more than once. Maybe you're importing a library twice?
My Liferay 7 server was using SomeModule happily, until I deployed a new version of SomeModule which has an additional required field favoriteColor.
Now whenever I try to load the portlet Liferay says:
java.lang.RuntimeException: Unable to create snapshot class for interface some.SomeModuleConfiguration
at com.liferay.portal.configuration.metatype.bnd.util.ConfigurableUtil._createConfigurableSnapshot(ConfigurableUtil.java:77)
at com.liferay.portal.configuration.metatype.bnd.util.ConfigurableUtil.createConfigurable(ConfigurableUtil.java:51)
at some.SomeModule.activate(SomeModule.java:50)
...
aused by: java.lang.IllegalStateException: Attribute is required but not set favoriteColor
at aQute.bnd.annotation.metatype.Configurable$ConfigurableHandler.invoke(Configurable.java:75)
at com.sun.proxy.$Proxy1220.favoriteColor(Unknown Source)
at some.SomeModuleConfigurationSnapshot407.<init>(Unknown Source)
The configuration UI for SomeModule does not show anything about favoriteColor.
How to fix that, for instance by setting favoriteColor to its default value?
An alternative path would be using a OSGi configuration file to set defaults and missing values. You can use those files as you do for those modules that come with liferay; e.g., elasticsearch config. (check your osgi/configs directory)
If you are lucky enough to have the source code of the module, you can solve this problem like this:
Temporarily make the new field optional, but replacing required = true to required = false in SomeModuleConfiguration.java.
Deploy the module.
Load the configuration page, save.
Restore to required = true.
Deploy again.
Alternative answers welcome!
I have an application in Angular 4 and I want to display version of my application somewhere in the view. The version string is expectedly contained in package.json version property.
What I've tried is to create a class and import JSON file directly into it, then expose the variable through getter method:
import * as PACKAGE from './../../../package.json';
export class PackageService {
public static getVersion (): string {
return (PACKAGE as any).version;
}
}
However, this solution raises compilation problems such as this one:
ERROR in Error encountered resolving symbol values statically. Expression form not supported (position 8:13 in the original .ts file), resolving symbol PackageService.getVersion in ./src/app/services/package.service.ts, resolving symbol AppModule in ./src/app/app.module.ts, resolving symbol AppModule in ./src/app/app.module.ts
webpack: Failed to compile.
Looks like the problem is with method being static. When I convert this class to normal Angular injectable service. It compiles correctly.
I'm using static method in order to add version string to DI container with: {provide: DI_VERSION, useValue: PackageService.getVersion()}, where DI_VERSION is an injection token. This would allow me to access the version string directly without injecting entire service and calling methods on it.
What exactly is causing this error and how do I fix it?
My application is throwing an exception from "com.vaadin.client.ApplicationConnection" class of vaadin 7.4.6 and i want to debug this class to exactly identify the issue.
I'm using IntellijIdea IDE and I'm able to debug the classes in the "com.vaadin.server" package but not in "com.vaadin.client" through Super Dev mode.
Do we need to do anything special for debugging in the "com.vaadin.client" package.
According to this and this, it should be easy to have Android Studio break on an uncaught exception. However, whatever I try, I seem not to get it working.
I set the "Class Filter" on my Activity, but the app just crashes on an uncaught exception, no breakpoint triggered.
Are you sure that the exception being raised is from the class that you've specified in the class filter?
Try configuring to break on all exceptions without the class filter enabled to validate that it's actually the specified class raising the exception: https://stackoverflow.com/a/28862538/3063884
I was unable to get the debugger to stop for anything until I clicked on the app folder in the project view (one level below root). Clicking on the Root folder of the project didn't work either.