lape Posted January 10, 2017 Share Posted January 10, 2017 (edited) I just updated to 1.6.1.10 and in products / CMS tinymce isnt showing. in chrome console i get an error at var path = $(location).attr('pathname'); error: Uncaught ReferenceError: $ is not defined Uncaught ReferenceError: $ is not defined at tiny_mce.js:5 (anonymous) @ tiny_mce.js:5 my code in the script is: /** * File used for compatibility purpose * @type {*|jQuery} */ var path = $(location).attr('pathname'); var path_array = path.split('/'); path_array.splice((path_array.length - 2), 2); var final_path = path_array.join('/'); window.tinyMCEPreInit = {}; window.tinyMCEPreInit.base = final_path + '/js/tiny_mce'; window.tinyMCEPreInit.suffix = '.min'; $.getScript(final_path + '/js/tiny_mce/tinymce.min.js'); Edited January 10, 2017 by lape (see edit history) Link to comment Share on other sites More sharing options...
Naik Lead Posted January 11, 2017 Share Posted January 11, 2017 Replace line at end with this code: $('head').append($('<script>').attr('type', 'text/javascript').attr('src', final_path + '/js/tiny_mce/tinymce.min.js')); Link to comment Share on other sites More sharing options...
lape Posted January 11, 2017 Author Share Posted January 11, 2017 (edited) Thanks for your answer. I tried this already the error remains the same. /** * File used for compatibility purpose * @type {*|jQuery} */ var path = $(location).attr('pathname'); (Uncaught ReferenceError: $ is not defined) var path_array = path.split('/'); path_array.splice((path_array.length - 2), 2); var final_path = path_array.join('/'); window.tinyMCEPreInit = {}; window.tinyMCEPreInit.base = final_path+'/js/tiny_mce'; window.tinyMCEPreInit.suffix = '.min'; $('head').append($('<script>').attr('type', 'text/javascript').attr('src', final_path + '/js/tiny_mce/tinymce.min.js')); Edited January 11, 2017 by lape (see edit history) Link to comment Share on other sites More sharing options...
c64girl Posted March 1, 2017 Share Posted March 1, 2017 (edited) Hey did You fixed it ? I have the same problem. I fix it for now changing the file tiny_mce.js to: /** * File used for compatibility purpose * @type {*|jQuery} */ /* var path = $(location).attr('pathname'); var path_array = path.split('/'); path_array.splice((path_array.length - 2), 2); var final_path = path_array.join('/'); window.tinyMCEPreInit = {}; window.tinyMCEPreInit.base = final_path+'/js/tiny_mce'; window.tinyMCEPreInit.suffix = '.min'; $('head').append($('<script>').attr('type', 'text/javascript').attr('src', final_path + '/js/tiny_mce/tinymce.min.js')); */ And i added in admin/themes/default/template/header.tpl <script type="text/javascript" src="/js/tiny_mce/tinymce.min.js"></script> before this - > </head> Edited March 1, 2017 by c64girl (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted March 1, 2017 Share Posted March 1, 2017 verify your files (especially js files) if they have changes from this github commit: https://github.com/PrestaShop/PrestaShop/commit/73fd8dbed9f413a70f7d04fc4badd48f00ca501a after changes - clear browser cache (there is achance that your browser remember old js files) Link to comment Share on other sites More sharing options...
lape Posted March 4, 2017 Author Share Posted March 4, 2017 @c64girl yes it worked! Thank you very much. Link to comment Share on other sites More sharing options...
c64girl Posted March 5, 2017 Share Posted March 5, 2017 (edited) verify your files (especially js files) if they have changes from this github commit: https://github.com/PrestaShop/PrestaShop/commit/73fd8dbed9f413a70f7d04fc4badd48f00ca501a after changes - clear browser cache (there is achance that your browser remember old js files) How they would change if i did not change anything... It just stopped working. Btw files are the same i have copied new ones from ps downlaoded from site 1.6.1.6. Edited March 5, 2017 by c64girl (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now