I am new in yii 2,
I am trying to integrate metronic theme in yii2 application,
I refer this website https://github.com/dlds/yii2-metronic for integration..
error Fatal error: Class 'dlds\metronic\Metronic' not found in C:\wamp\www\basic\config\web.php,
please anyone help me.
have you edit your config/web.php with this code:
'components' => [
'metronic'=>[
'class'=>'dlds\metronic\Metronic',
'resources'=>'[path to my web]/web/metronic/assets/theme/assets',
'style'=>\dlds\metronic\Metronic::STYLE_MATERIAL,
'theme'=>\dlds\metronic\Metronic::THEME_LIGHT,
'layoutOption'=>\dlds\metronic\Metronic::LAYOUT_FLUID,
'headerOption'=>\dlds\metronic\Metronic::HEADER_FIXED,
'sidebarPosition'=>\dlds\metronic\Metronic::SIDEBAR_POSITION_LEFT,
'sidebarOption'=>\dlds\metronic\Metronic::SIDEBAR_MENU_ACCORDION,
'footerOption'=>\dlds\metronic\Metronic::FOOTER_FIXED,
],]
You must be sure where you loaded the component in this line:
'resources'=>'[path to my web]/web/metronic/assets/theme/assets',
Related
So, I am trying to follow a number of the file pond example and each of them include some form of CSS import (I get it, there is a lot that comes with beauty). However, no matter what I try, Filepond or Pintura (formerly Doka), I get this error in some form:
Compiled with problems:
ERROR in ./node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
ValidationError: Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
- options should be an object:
object { injectType?, attributes?, insert?, base?, esModule?, modules? }
at validate (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/node_modules/schema-utils/dist/validate.js:105:11)
at Object.loader (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/dist/index.js:25:29)
ERROR in ./node_modules/filepond/dist/filepond.min.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
ValidationError: Invalid options object. Style Loader has been initialized using an options object that does not match the API schema.
- options should be an object:
object { injectType?, attributes?, insert?, base?, esModule?, modules? }
at validate (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/node_modules/schema-utils/dist/validate.js:105:11)
at Object.loader (/Users/ryanolson/github/realkinkmen/node_modules/style-loader/dist/index.js:25:29)
I have NO IDEA how to fix this as I am not experienced enough with what would be going on. I am guessing it has to do with Webpack and build but no idea what I need to do to fix it. Any help?
I also want to mention this is a Laravel/VueJS/Tailwind stack
The solution is to add the CSS files to the app.css file under /resources/css/app.css
#import 'filepond/dist/filepond.min.css';
#import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css";
I uploaded theme in prestashop 1.7. When I want to install it i'm getting error 500, i turned on debug mode and now I see this error:
Compile Error: Cannot declare class WishList, because the name is already in use
And here is the code of this error:
in modules/leofeature/classes/WishList.php (line 566)
return Db::getInstance()->executeS(' SELECT wp.* FROM `'._DB_PREFIX_.'leofeature_wishlist_product` wp WHERE wp.`id_wishlist` = '.(int)$id_wishlist.''); }}
Can anyone help me with that?
You probably installed another module with a class of the same name : WishList
I have a ModalDirective from ngx-bootstrap version 1.9.3 and am using Angular 4. When a call is made to show() when code is executing on the server side (I am using Angular Universal), I am getting the following exception:
Cannot read property 'body' of undefined
TypeError: Cannot read property 'body' of undefined
at ModalDirective.checkScrollbar (ClientApp\dist\main-server.js:49156:105)
at ModalDirective.show (ClientApp\dist\main-server.js:48977:14)
at ConfirmModalComponent.show (ClientApp\dist\main-server.js:48086:27)
at SafeSubscriber._error (ClientApp\dist\main-server.js:87270:41)
at SafeSubscriber.module.exports.SafeSubscriber.__tryOrUnsub (ClientApp\dist\vendor.js:574:16)
at SafeSubscriber.module.exports.SafeSubscriber.error (ClientApp\dist\vendor.js:533:26)
at Subscriber.module.exports.Subscriber._error (ClientApp\dist\vendor.js:464:26)
at Subscriber.module.exports.Subscriber.error (ClientApp\dist\vendor.js:438:18)
at MapSubscriber.module.exports.Subscriber._error (ClientApp\dist\vendor.js:464:26)
at MapSubscriber.module.exports.Subscriber.error (ClientApp\dist\vendor.js:438:18)
Is the code not built to support Angular Universal or is there something I need to do in order to get this working?
Please update ngx-bootstrap to 2.0.0-beta.8, it supports Angular Universal.
After logged in successfully, Yii does not executing any page.
Showing an error:
Error 404 Unable to resolve the request "membersdet/index"
Here membersdet is controller Id and index is an action.
Make sure the filename of your controller is EXACTLY "MembersdetController.php". It is case sensitive.
I guess you were developing on local machine under Windows OS and server runs on *nix system. That's normal issue for novice developers, that they forget about case sensitive file system in *nix.
It is because of wrong controller file name given or may be actionIndex() method is not in your controller.
I have had a similar problem and got it solved. In this case the file was correctly named but the class name was wrongly spelled. When these two do not correspond, you could get this error too.
Check case sensitive exactly your controller: MembersdetController
Check alias (common in config/main.php) map with namespace in your controller
Yii::setAlias('#tienn2t', dirname(dirname(__DIR__)) . '/tienn2t');
In MembersdetController.php file
<?php
namespace tienn2t\controllers;
use Yii;
use yii\web\Controller;
class MembersdetController extends Controller{
public function actionIndex(){
echo 1;die;
}
}
There is not enough information in the question, but maybe you have an incorrect .htaccess or if you don't have an htaccess at all you should use the url:
http://host/index.php?r=membersdet/index
Make sure you have MembersdetController in /protected/controllers/ and this class "is a" CController and has a public method named actionIndex().
Check errorHandler block in your config file.
I had fix this error like this
'errorHandler' => [
'errorAction' => 'error/index',
],
By the way you should have appropriate ErrorController in your module and /error/index.php
file in view folder.
Hope will help you.
I have been attempting to implement a custom dojo build to replace the dojo version that comes with spring roo 1.1.5.
I followed the instructions at
http://sagittech.blogspot.com/2011/08/asdadsad-qwasdace-aavvrv-place-holder.html
as well as
http://www.qc4blog.com/?p=1001
I have been able to create the builds.
My problem is that when I place the new build into the project like
WEB-INF\classes\META-INF\web-resources\dojo-1.6.2\
(FYI: I renamed the version from 1.6.1 to 1.6.2 to avoid conflict with same version as in
Roo.)
When I load my web page I get
syntax error
http://localhost:8080/app-1.0.0/resources/dojo-1.6.2/dojo/dojo.js
Line 14
also
missing ) after argument list
http://localhost:8080/app-1.0.0/
Line 3
dojo is not defined
http://localhost:8080/app-1.0.0/resources/spring/Spring-Dojo.js
Line 16
So, the question is:
What is the proper way to integrate a new custom dojo build with Spring Roo?
Is there a special way to build dojo to make this happen?
Are there additional steps required to make a custom build work with Roo?
Update:
Below is my profile file to create the new dojo.js
dependencies = {
optimize:"shrinksafe",
stripConsole: "normal",
cssOptimize: "comments",
layers:
[
{
name: "dojo.js",
layerDependencies:
[
"dojo.js",
],
dependencies:
[
"dijit.Dialog",
"dijit.Tooltip",
"dijit.form.DateTextBox",
"dijit.form.CheckBox",
"dijit.form.CurrencyTextBox",
"dojox.widget.Standby",
"dijit.form.ComboBox",
"dijit.form.FilteringSelect",
"dojox.form.PasswordValidator",
"dojo.parser",
"dijit.form.Form",
"dojox.grid.EnhancedGrid",
"dojo.data.ItemFileWriteStore",
"dijit.TitlePane",
"dijit.layout.LayoutContainer",
"dijit.layout.BorderContainer",
"dijit.form.SimpleTextarea",
"dijit.form.Textarea",
"dojo.date.locale",
"dojo.data.ItemFileReadStore",
"dojox.grid.cells.dijit",
"dojox.grid.DataGrid",
"dijit.form.Button",
"dijit.form.ValidationTextBox",
"dijit.Dialog",
"dijit.form.NumberSpinner",
"dojox.grid.enhanced.plugins.Menu",
"dojox.grid.enhanced.plugins.NestedSorting",
"dojox.grid.enhanced.plugins.IndirectSelection",
"dijit.MenuItem",
"dijit.MenuSeparator",
"dijit.PopupMenuItem",
"dijit.Menu",
"dojox.form.Uploader",
"dojox.form.uploader.FileList",
"dojox.form.uploader.plugins.Flash",
"dijit.form.Select"
]
}
],
prefixes: [
["dijit", "../dijit"],
["dojox", "../dojox"]
]
}
After making sure that I made the new optimized file the same as dojo.js to insure that dojo was found I now get the following error:
failed loading /app-1.0.0/resources/dojo-1.6.2/dojo/./parser.js with error: SyntaxError: syntax error
http://localhost:8080/app-1.0.0/resources/dojo-1.6.2/dojo/dojo.js
Line 14
I solved this in part by an answer given at
http://forum.springsource.org/showthread.php?118073-javascript-files-not-loading
I made sure that I had
<script type="text/javascript">dojo.require("dojo.parser");<!-- required for FF3 and Opera --></script>
Also, I had to verify that
<c:set var="dojo_baseline">/resources/dojo-1.6.2/</c:set>
pointed to the correct folder. Previously I had it at 1.6.1
also, that
webmvc-config.xml
looked like
<mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>