Jump to content

[Help] cannot add or edit product, presta 1.5.5


Recommended Posts

hello, i need little help here, anybody can give me the solution ?

 

here's my problem, when i try to edit some product, suddenly my categories didn't show up at all.. 

 

mr_37335995.jpg

 

and in the image section, there is no upload button and the product picture didn't show up.. 

 

mr_33927413.jpg

 

there is more than 100 product that i already post.. and i cannot edit and also add new product.. 

please give me solution, thanks.. :)

Link to comment
Share on other sites

check if you get an error (use google chrome console) sometimes is a missing file

 

i'm using the console, i think there is something wrong with my jquery.. 

 

this problem also appears when you're trying to add new product? or only when you're trying to edit already added products to your shop?

both of it, add new product and edit already product.. 

any solution or suggestion ?

Link to comment
Share on other sites

here's my error console :
 

here's my error console :
 


SyntaxError: missing ; before statement tiny_mce.js:1
Use of attributes' specified attribute is deprecated. It always returns true. jquery-1.7.2.min.js:2
Use of getAttributeNode() is deprecated. Use getAttribute() instead. jquery-1.7.2.min.js:2
ReferenceError: tinyMCE is not defined tinymce.inc.js:42
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead.

 

 

and my TinyMCe also didn't show up.. :o
but, when i try run on IE, it's works everything fine..
whereas the javascript in the firefox and chrome is already enabled, but still give me this error.. :(

Link to comment
Share on other sites

Hi 

 

try replacing the tiny_mce.js file with the fresh prestashop tiny_mce.js file.You can find this file in js/tiny_mce folder.

 

Thanks !, it works again now, i can edit and add new products again.. .. :)

 

but, one of my module still didn't load the text editor.. :(

it's home modal windows.. 

 

this is the homemodalwindows.php script

public function _displayForm(){
		$this->__construct();
		global $cookie;
		$t='';
		$t .= '<img src="../modules/homemodalwindow/logo.gif" style="float:left; margin-right:15px;"><b>'.$this->l('This module shows content by modal window at home page.').'</b><br /><br />';
		$iso = Language::getIsoById((int)($cookie->id_lang));
		$isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en');
		$ad = dirname($_SERVER["PHP_SELF"]);
		
		
		if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0)
			$t .= '
			<script type="text/javascript">	
				var iso = \''.(file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en').'\' ;
				var pathCSS = \''._THEME_CSS_DIR_.'\' ;
				var ad = \''.dirname($_SERVER['PHP_SELF']).'\' ;
			</script>
			<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script>
			<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
			<script language="javascript" type="text/javascript">
				id_language = Number('.$id_lang_default.');
				tinySetup();
			</script>';
		else
		{
			$t .= '
			<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
			<script type="text/javascript">
				tinyMCE.init({
					mode : "textareas",
					theme : "advanced",
					plugins : "safari,pagebreak,style,layer,table,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,fullscreen",
					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",
					theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen",
					theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,pagebreak",
					theme_advanced_toolbar_location : "top",
					theme_advanced_toolbar_align : "left",
					theme_advanced_statusbar_location : "bottom",
					theme_advanced_resizing : false,
					content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css",
					document_base_url : "'.__PS_BASE_URI__.'",
					width: "600",
					height: "auto",
					font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",
					template_external_list_url : "lists/template_list.js",
					external_link_list_url : "lists/link_list.js",
					external_image_list_url : "lists/image_list.js",
					media_external_list_url : "lists/media_list.js",
					elements : "nourlconvert",
					entity_encoding: "raw",
					convert_urls : false,
					language : "'.(file_exists(_PS_ROOT_DIR_.'/js/tinymce/jscripts/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en').'"
				});
				id_language = Number('.$id_lang_default.');
			</script>';
		}

any solution ? 

Link to comment
Share on other sites

on page where the tinymce editor appear (module edit page)

if you turn on console - you see some errors?

 

hello, i have the same problem

 

 

this is my console error

 

 

Attr.specified is deprecated. Its value is always true.
Uncaught TypeError: undefined is not a function jquery.ui.widget.min.js:4
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
 
 

Can you help me?

 

Thanks 

Luca

Link to comment
Share on other sites

maybe uses an old version of the module. you can upload the tynymce to module folder (from ps older version) and change the url 

 

.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

 

for the url from your module

Link to comment
Share on other sites

on page where the tinymce editor appear (module edit page)

if you turn on console - you see some errors?

 

Thankyou vekia, it is solved now :) tinymce now appear in that module.. 

 

maybe uses an old version of the module. you can upload the tynymce to module folder (from ps older version) and change the url 

 

.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

 

for the url from your module

 

yes, thankyou shacker.. i use this method and it's works... :)

 

but, i still have one problem with this module, this module suppose to show some popup window but i don't know why it doesn't works..

it's just gave me this error..

 

mr_11540788.jpg

 

 

that is .fancybox jquery function didn't work.. i also use the new version of fancybox from presta1.5.6 and i copy that to the module directory like tinymce method.. but still error.. :(

 

here's i attach my module php and .tpl file.. hope you can help me.. 

homemodalwindow.php

homemodalwindow.txt

Link to comment
Share on other sites

the txt is a php file

 

oh my.. i'm sorry it's my fault not to check it again.. :)

here's the tpl file..

{if isset($content) AND $content}
<!-- MODULE home modal window -->

{literal}
<style>
.fancybox-inner h1.success_inline {
color: #418B19;
text-align: center;
padding-top: 40px;
}
.fancybox-inner h1.warning_inline {
color: #DA0F00;
text-align: center;
padding-top: 40px;
}
</style>

<script type="text/javascript">
jQuery(document).ready(function() {
	$.fancybox(
		'{/literal}{if isset($msg) && $msg}<h1 class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</h1>{else}{$content}<br/><a href="?dontshowhmw=yes">{l s=' Dont Show This Again ' mod='homemodalwindow'}</a>{/if}{literal}',
		{
			'width'			    : 650,
			'height'		    : 400,
			'autoScale'  		: true,
			'scrolling'  		: 'no'
		});
});
</script>

{/literal}

{/if}<!-- /MODULE home modal window -->

Link to comment
Share on other sites

 

open a literal here

 

  1. {literal}{
  2. 'width' : 650,
  3. 'height' : 400,
  4. 'autoScale' : true,
  5. 'scrolling' : 'no'
  6. }{/literal});

 

 

i tried This :

{if isset($content) AND $content}
<!-- MODULE home modal window -->

{literal}
<style>
.fancybox-inner h1.success_inline {
color: #418B19;
text-align: center;
padding-top: 40px;
}
.fancybox-inner h1.warning_inline {
color: #DA0F00;
text-align: center;
padding-top: 40px;
}
</style>

<script type="text/javascript">
jQuery(document).ready(function() {
	$.fancybox(
		'{/literal}{if isset($msg) && $msg}<h1 class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</h1>{else}{$content}<br/><a href="?dontshowhmw=yes">{l s=' Dont Show This Again ' mod='homemodalwindow'}</a>{/if}',
		{literal}{
			'width'			    : 650,
			'height'		    : 400,
			'autoScale'  		: true,
			'scrolling'  		: 'no'
		}{/literal});
});
</script>



{/if}<!-- /MODULE home modal window -->

 and this :

{if isset($content) AND $content}
<!-- MODULE home modal window -->

{literal}
<style>
.fancybox-inner h1.success_inline {
color: #418B19;
text-align: center;
padding-top: 40px;
}
.fancybox-inner h1.warning_inline {
color: #DA0F00;
text-align: center;
padding-top: 40px;
}
</style>

<script type="text/javascript">
jQuery(document).ready(function() {
	$.fancybox(
		'{/literal}{if isset($msg) && $msg}<h1 class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</h1>{else}{$content}<br/><a href="?dontshowhmw=yes">{l s=' Dont Show This Again ' mod='homemodalwindow'}</a>{/if}{literal}',
		{literal}{
			'width'			    : 650,
			'height'		    : 400,
			'autoScale'  		: true,
			'scrolling'  		: 'no'
		}{/literal});
});
</script>

{/literal}

{/if}<!-- /MODULE home modal window -->

both of it give me the same result like this :( 

mr_95542776.jpg

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...