Jump to content

Tiny_mce not working ps 1.6.1.10


lape

Recommended Posts

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 by lape (see edit history)
Link to comment
Share on other sites

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 by lape (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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 by c64girl (see edit history)
  • Like 1
Link to comment
Share on other sites

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 by c64girl (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...