Jump to content

Problem with category tree PrestaShop 1.5.4


bramimhof

Recommended Posts

Hi all,

 

I have a problem with the category tree in PrestaShop 1.5.4.

When I'm editing a product and I want to assign a category to this product, the category tree won't expand and only shows "home".

 

I've been searching on the forum for this problem and I read that it could be a javascript problem. So I opened the console and I saw that the tinymce.inc.js file couldn't be loaded by a 404 error.

GET /js/tinymce.inc.js 404 (Not Found) index.php?controller=AdminProducts&id_product=3&updateproduct&token=a6b41fe1c3bf40b0ff04d924e22790db:84
Uncaught ReferenceError: tinySetup is not defined 

When I was searching for that file in my browser an error came up: 

File not found.

But when I type a random file in the address bar (a file that doesn't excist for sure, something like testpresta234033.js) an other error comes up: 

file_not_found

This is an other error then the error that comes up at file I need. So PrestaShop is doing something with the file tinymce.inc.js. If I rename the file tinymce.inc.js in the FTP to tinymce123.inc.js the same error as the first one comes up:

File not found.

Then I tried to change the filename to a name without .inc so I changed the name to tinymce.js and then the whole javascript file came up.

function tinySetup(config)
{
	if(!config)
		config = {};

	default_config = {
		mode : "specific_textareas",
		theme : "advanced",
		skin:"cirkuit",
		editor_selector : "rte",
		editor_deselector : "noEditor",
		plugins : "safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview",
		// Theme options
		theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor, media, fullscreen",
	//	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,|,ltr,rtl,|",
	//	theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,pagebreak",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",	
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		content_css : pathCSS+"global.css",
		document_base_url : ad,
		width: "600",
		height: "auto",
		font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",
		elements : "nourlconvert,ajaxfilemanager",
		file_browser_callback : "ajaxfilemanager",
		entity_encoding: "raw",
		convert_urls : false,
		language : iso
	}

	$.each(default_config, function(index, el)
	{
		if (config[index] === undefined )
			config[index] = el;
	});
	tinyMCE.init(config);
};


	function ajaxfilemanager(field_name, url, type, win) {
		var ajaxfilemanagerurl = ad+"/ajaxfilemanager/ajaxfilemanager.php";
		switch (type) {
			case "image":
				break;
			case "media":
				break;
			case "flash": 
				break;
			case "file":
				break;
			default:
				return false;
	}
    tinyMCE.activeEditor.windowManager.open({
        url: ajaxfilemanagerurl,
        width: 782,
        height: 440,
        inline : "yes",
        close_previous : "no"
    },{
        window : win,
        input : field_name
    });
}

So the error only happens when .inc is in the filename. I really don't know what's the problem and how to solve this.

 

Do you guys have any suggestions? I've added some screenshots to make it more clear.

Thanks in advance!

 

P.S. my apologies for the bad English.. ;-)

 

 

post-759041-0-05213000-1403184599_thumb.png

post-759041-0-93845500-1403184599_thumb.png

post-759041-0-80616200-1403184600_thumb.png

post-759041-0-44298800-1403184601_thumb.png

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...