Uncaught Error: Graph container element not found - javascript

I saw answer "JavaScript's code gets executed before the DOM contains #annual element. Put the javascript after the div or use jQuery.ready()" But I don't know to put after what div?
<script src="/bower_components/morris.js/morris.min.js"></script> this is script include?
enter image description here
error:
Uncaught Error: Graph container element not found
at d [as constructor] (morris.min.js:6)
at d.c [as constructor] (morris.min.js:6)
at new d (morris.min.js:6)
at HTMLDocument.<anonymous> (dashboard.js:129)
at j (jquery.min.js:2)
at k (jquery.min.js:2)

If you are using adminLte template in an angular project, you have to delete the import dashboard.js from the scripts array in angular.json file.

i confirm resolution :
im using AdminLTE in angular :
delete the import dashboard.js from the scripts array in angular.json file.

Related

For WordPress element editor frontend.min.js And jquery.min.js conflict

For WordPress element editor frontend.min.js And jquery.min.js conflict.
Error message:
Uncaught TypeError: e.elementorWaypoint is not a function
at Frontend.waypoint (frontend.min.js:2)
at Counter.onInit (frontend.min.js:2)
at Counter.Module.trigger (frontend-modules.min.js:2)
at Counter.e.each.r.<computed> [as trigger] (frontend-modules.min.js:2)
at init (frontend-modules.min.js:2)
at Counter.Module (frontend-modules.min.js:2)
at Counter.child [as constructor] (frontend-modules.min.js:2)
at new child (frontend-modules.min.js:2)
at Counter._createSuperInternal (frontend.min.js:2)
at new Counter (frontend.min.js:2)
Introduce and introduce local via Google CDN jQuery.js It's not all right.It also tried to replace $JQ with JQ, which did not help.I need help and time is running out.
error message images

concrete5 ccm_activateTabBar() not defined when not logged in

I have a specific question, I did build a component with tabs in concrete5 v8 with this tutorial:
Creating tabbed panels in concrete5
It worked just fine, as long as I was logged in into concrete5, as soon as I am not logged in I get the following error in the console, and therefor I'm not able to click on the different tabs:
Uncaught ReferenceError: ccm_activateTabBar is not defined
at HTMLDocument. (entsorgung-von-abfaellen:84)
at j (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.J (jquery.js:2)
The error references to this part of the line 84:
<script type="text/javascript">$(function() { ccm_activateTabBar($('#ccm-tabs-1077221103'));});</script>
which follows directly after the ul element and seems to got generated by concrete5.
I was not able to find anything related at all, I guess it has something to do with missing assets that are only loaded when logged in as administrator.
I'm currently only loading the following assets when not logged in:
$u = new User();
if(!$u->isLoggedIn()) {
$this->requireAsset('javascript', 'jquery');
$this->requireAsset('jquery/ui');
}
Maybe someone already worked with the concrete5 tabs and can help me with this error.
Ass suggested by Michele Locati, you should probably use jquery/ui or bootstrap components to build you tab component.
But if you find yourself in the same situation as I was, a very simple fix is to copy the tabs.js from
concrete/js/build/core/app/tabs.js
to your theme folder and include it if the user is not logged in.
For example like this:
<?php
$u = new User();
if(!$u->isLoggedIn()) : ?>
<script src="<?php echo $view->getThemePath(); ?>/js/c5_tabs/tabs.js"></script>
<?php endif; ?>
The tabs.js is part of app.js which is quite big, so I only used tabs.js, which only contains the needed function I was missing.
Credits for this information to MrKDilkington from the concrete5 forum:

uncaught TypeError: Cannot read property 'substr' of undefined ionic

Suddenly im getting error when i start ionic project
TypeError: Cannot read property 'substr' of undefined
at Function.<anonymous> (D:\Work\Prince\TakeToTake\node_modules\source-map\lib\source-node.js:115:26)
at Array.forEach (native)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (D:\Work\Prince\TakeToTake\node_modules\source-map\lib\sour
at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (D:\Work\Prince\TakeToTake\node_modules\source-map\lib
at SourceMapSource.node (D:\Work\Prince\TakeToTake\node_modules\webpack-sources\lib\SourceMapSource.js:39:21)
at ReplaceSource.node (D:\Work\Prince\TakeToTake\node_modules\webpack-sources\lib\ReplaceSource.js:70:30)
at CachedSource.node (D:\Work\Prince\TakeToTake\node_modules\webpack-sources\lib\CachedSource.js:18:24)
at D:\Work\Prince\TakeToTake\node_modules\webpack-sources\lib\ConcatSource.js:37:50
at Array.map (native)
at ConcatSource.node (D:\Work\Prince\TakeToTake\node_modules\webpack-sources\lib\ConcatSource.js:36:63)
Please Help
Found the error
i was implement two Component inside one TS file that's why the nodeJS confuse to run which component
now i created another ts file to implement the component
thanks for the comments

Including Angular-UI-Validate in my project

The project uses Angular 1.3 (from a CDN, links removed below) and I'm trying to install Angular-UI-Validate. I have included both in script tags, and in the inspector, I can see that they're both getting retrieved correctly. Still, it seems as if I'm missing something:
Error: [$injector:unpr] http://errors.angularjs.org/1.3.10/$injector/unpr?p0=ui.validateProvider%20%3C-%20ui.validate%20%3C-%20app.runtimeStackAdminController
at Error (native)
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:6:417
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:38:307
at Object.d [as get] (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:36:308)
at https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:38:381
at d (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:36:308)
at e (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:37:64)
at Object.g.instantiate (https://l***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:37:213)
at b.$get (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular.min.js:76:318)
at $route.link (https://***.cdn.net/1.5/libs/angular.js/1.3.10/angular-route.js:981:26) <div id="ng-view-wrapper" class="container-fluid ng-scope" ng-view="" autoscroll="true">
Am I missing a library that I have to include? Thanks in advance!
You need to load the ui.validate module.
See https://github.com/angular-ui/ui-validate#usage for all instructions.

Angular JS Karma module not found

I get an error message -"ReferenceError: module is not defined" when trying to test angular js code.
test script [testSpec.js]
describe('Project controllers', function() {
beforeEach(module('project'));
describe('ListCtrl', function() {
expect(1).toBe(1);
});
});
I have the following entries in my html file
<script src="angular.min.js"></script>
<script src="angular-resource.min.js"></script>
<script src="angular-mocks.js"></script>
followed by my test script - testSpec.js
I specifically included angular.js and angular-mocks.js again. I get to see the following error message
Chrome 31.0.1650 (Windows 7) Project controllers ListCtrl should create 11 records FAILED
TypeError: Object #<Object> has no method 'apply'
Error: Unknown provider: ProjectsProvider <- Projects
at Error (<anonymous>)
at c:/Angular/angular-phonecat/app/angular.min.js:30:24
at Object.c [as get] (c:/Angular/angular-phonecat/app/angular.min.js:27:310)
at c:/Angular/angular-phonecat/app/angular.min.js:30:109
at c (c:/Angular/angular-phonecat/app/angular.min.js:27:310)
at d (c:/Angular/angular-phonecat/app/angular.min.js:27:444)
at Object.instantiate (c:/Angular/angular-phonecat/app/angular.min.js:29:80)
at c:/Angular/angular-phonecat/app/angular.min.js:53:80
at null.<anonymous> (c:/Angular/angular-phonecat/app/testSpec.js:10:12)
at Object.d [as invoke] (c:/Angular/angular-phonecat/app/angular.min.js:28:464)
Error: Declaration Location
at window.jasmine.window.inject.angular.mock.inject (c:/Angular/angular-phonecat/app/angular-mocks.js:1781:2
Here is the complete error
5) at null.<anonymous> (c:/Angular/angular-phonecat/app/testSpec.js:8:34)\n
at null.<anonymous> (c:/Angular/angular-phonecat/app/testSpec.js:6:2)\n
at c:/Angular/angular-phonecat/app/testSpec.js:2:1
Chrome 31.0.1650 (Windows 7) Project controllers ListCtrl should contain new fields FAILED
TypeError: Object #<Object> has no method 'apply'
Error: Unknown provider: ProjectsProvider <- Projects
I'm suspecting that you're missing some include files in you karma config file. Specifically, make sure you load angular.js.
Did you include angular-mocks.js ?
That should solve your problem.
You need that for it to work.

Categories

Resources