satriyoz Posted April 7, 2014 Share Posted April 7, 2014 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.. and in the image section, there is no upload button and the product picture didn't show up.. 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 More sharing options...
shacker Posted April 9, 2014 Share Posted April 9, 2014 check if you get an error (use google chrome console) sometimes is a missing file Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2014 Share Posted April 10, 2014 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? Link to comment Share on other sites More sharing options...
satriyoz Posted April 12, 2014 Author Share Posted April 12, 2014 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 More sharing options...
webdev0008 Posted April 12, 2014 Share Posted April 12, 2014 Hi Can you copy and paste here your console errors. Link to comment Share on other sites More sharing options...
satriyoz Posted April 12, 2014 Author Share Posted April 12, 2014 here's my error console : here's my error console : SyntaxError: missing ; before statement tiny_mce.js:1Use of attributes' specified attribute is deprecated. It always returns true. jquery-1.7.2.min.js:2Use of getAttributeNode() is deprecated. Use getAttribute() instead. jquery-1.7.2.min.js:2ReferenceError: tinyMCE is not defined tinymce.inc.js:42Use of getPreventDefault() is deprecated. Use defaultPrevented instead. and my TinyMCe also didn't show up.. 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 More sharing options...
webdev0008 Posted April 12, 2014 Share Posted April 12, 2014 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. Link to comment Share on other sites More sharing options...
shacker Posted April 12, 2014 Share Posted April 12, 2014 try upload the latest version of tiny on ps 1.5.6.2 Link to comment Share on other sites More sharing options...
satriyoz Posted April 13, 2014 Author Share Posted April 13, 2014 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 More sharing options...
vekia Posted April 13, 2014 Share Posted April 13, 2014 on page where the tinymce editor appear (module edit page) if you turn on console - you see some errors? Link to comment Share on other sites More sharing options...
TecnicoLuca Posted April 13, 2014 Share Posted April 13, 2014 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 More sharing options...
shacker Posted April 14, 2014 Share Posted April 14, 2014 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 More sharing options...
satriyoz Posted April 16, 2014 Author Share Posted April 16, 2014 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.. 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 More sharing options...
shacker Posted April 16, 2014 Share Posted April 16, 2014 is not escaped. the module dont have a tpl file? Link to comment Share on other sites More sharing options...
satriyoz Posted April 19, 2014 Author Share Posted April 19, 2014 is not escaped. the module dont have a tpl file? that .txt (see on attachment file) file is the only .tpl file on that module.. Link to comment Share on other sites More sharing options...
shacker Posted April 20, 2014 Share Posted April 20, 2014 the txt is a php file Link to comment Share on other sites More sharing options...
satriyoz Posted April 20, 2014 Author Share Posted April 20, 2014 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 More sharing options...
shacker Posted April 20, 2014 Share Posted April 20, 2014 open a literal here {literal}{ 'width' : 650, 'height' : 400, 'autoScale' : true, 'scrolling' : 'no' }{/literal}); Link to comment Share on other sites More sharing options...
satriyoz Posted April 21, 2014 Author Share Posted April 21, 2014 open a literal here {literal}{ 'width' : 650, 'height' : 400, 'autoScale' : true, 'scrolling' : 'no' }{/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 Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2014 Share Posted April 21, 2014 you have to use only one {literal} and {/literal} you can't use constructions like {literal}{literal}{/literal}{/literal} Link to comment Share on other sites More sharing options...
shacker Posted May 12, 2014 Share Posted May 12, 2014 well, you can use if need to put smarty under javascript to avoid read as literal and dnt execute. Link to comment Share on other sites More sharing options...
Recommended Posts