I have Magento2 site. When I load first time in the browser it's not loading.
Complete and show javascript error in the console but when I refresh, it shows correct? What is the issue in Magento 2
Asked
Active
Viewed 1,464 times
4
Teja Bhagavan Kollepara
- 3,816
- 5
- 32
- 69
imtiaz
- 117
- 1
- 10
-
Can you provide the javascript error screenshot. – Arjun Aug 11 '16 at 09:18
-
thank arjun please check now these error come when i upload site first time but when i refresh this error not come and site work properly – imtiaz Aug 11 '16 at 09:22
-
Are you facing these after 1st installation of magento2. The admin and frontend goes blank and shows error then follow this link and my answer over there http://magento.stackexchange.com/questions/130920/a-fresh-install-magento2-1-error-404-not-found/130923#130923 – Arjun Aug 11 '16 at 09:34
-
no no all is set it not first time it happen always when i run on new browser – imtiaz Aug 11 '16 at 09:36
-
you can try it by either updating the browser version. Before that try to clear your browser cache and magento cache. – Arjun Aug 11 '16 at 09:39
-
it problem in all browser infact i check other browsers – imtiaz Aug 11 '16 at 10:20
-
@imtiaz have you fix this issue. i am facing same issue in ultimo theme – Vaibhav Ahalpara Jul 03 '17 at 09:59
2 Answers
0
Last error solution:-
Uncaught TypeError: Cannot read property 'timepicker' of undefined
means that
$.ui
is undefined. So, you probably have not included jQuery UI.
Try to include it before any of your scripts (except jQuery itself).
Manoj Deswal
- 5,785
- 25
- 27
- 50
Arjun
- 3,576
- 23
- 59
-
-
@Arjun I am facing same issue so where can i include jQuery file in my website? – Chintan Kaneriya Aug 17 '18 at 10:44
0
Have you written any custom javascript? As the answer answer states you have an issue with jqueryui. Although to explain further you shouldn't need to include jquery or jquery ui. Just use requirejs to load it for you. For example
define([
'jquery',
'jquery/ui',
'mage/accordion'
], function($) {
$.widget('vendor.customAccordion', $.mage.accordion, {
someAction: function(element) {
// your code here
}
});
})
https://belvg.com/blog/how-to-use-jquery-and-requirejs-in-magento-2-javascript-solutions.html
Dominic Pixie
- 7,520
- 4
- 17
- 56
