{"id":1111,"date":"2015-08-22T16:41:08","date_gmt":"2015-08-22T13:41:08","guid":{"rendered":"http:\/\/sahinsolmaz.com\/blog\/?p=1111"},"modified":"2015-08-22T16:46:38","modified_gmt":"2015-08-22T13:46:38","slug":"prestashop-fatal-error-call-to-undefined-method-toolssafedefine-in","status":"publish","type":"post","link":"https:\/\/sahinsolmaz.com\/blog\/prestashop-fatal-error-call-to-undefined-method-toolssafedefine-in\/","title":{"rendered":"PRESTASHOP Fatal error: Call to undefined method Tools::safeDefine() in"},"content":{"rendered":"<p>Merhabalar,<\/p>\n<p>Yine basit bir Prestashop hatas\u0131 ile kar\u015f\u0131 kar\u015f\u0131yay\u0131z ve hemen kar\u015f\u0131la\u015ft\u0131\u011f\u0131m\u0131z hatay\u0131, nedenini ve \u00e7\u00f6z\u00fcm\u00fcn\u00fc payla\u015fal\u0131m.<\/p>\n<p><strong>PRESTASHOP HATA:<\/strong><\/p>\n<p><strong>PRESTASHOP ERROR:<\/strong><\/p>\n<h3>PRESTASHOP Fatal error: Call to undefined method Tools::safeDefine() in ..<\/h3>\n<p>Bu hata ile kar\u015f\u0131la\u015f\u0131yorsan\u0131z e\u011fer, Prestashop (\u015fu anki g\u00fcncel versiyon: 1.6.1.0) g\u00fcncel versiyonlardan birisini kullan\u0131yorsunuz ve g\u00fcncelle\u015ftirme yaparak bu versiyona ula\u015ft\u0131n\u0131z demektir.<\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>Tools::safeDefine() <strong>hatas\u0131n\u0131n nedeni nedir?<\/strong><\/h3>\n<p>Ana dizindeki classes klas\u00f6r\u00fc i\u00e7erisinde bir classes klas\u00f6r\u00fc daha var ve burada ihtiyac\u0131m\u0131z olan <strong>safeDefine()<\/strong> yok, Prestashop buna ula\u015famad\u0131\u011f\u0131 i\u00e7in <strong>undefined method<\/strong> yani ge\u00e7ersiz\/tan\u0131ms\u0131z method diyor hakl\u0131 olarak..<\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3><strong>What is the cause of the error <\/strong>Tools::safeDefine() ?<\/h3>\n<p>I think that, you are using new Prestashop version\u00a0 and you did upgrade your old version. Anyway..<\/p>\n<p>There is classes folder in your Prestashop root path but there is another classes folder in your classes folder. For example: RootPS\/classes\/classes. and there is tools.php in your second classes folder but there isn&#8217;t safeDefine() function in your tools.php; so it is giving that error.<\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>Fatal error: Call to undefined method Tools::safeDefine() <strong>\u00c7\u00d6Z\u00dcM\u00dc<\/strong><\/h3>\n<p><!--more--><\/p>\n<p>Olduk\u00e7a basit,<\/p>\n<ul>\n<li>Anadizindeki classes klas\u00f6r\u00fcn\u00fc silin, ayn\u0131 s\u00fcr\u00fcmdeki classes klas\u00f6r\u00fcn\u00fc y\u00fckleyin ve tekrar kontrol edin..<\/li>\n<\/ul>\n<p>Hepsi bu kadar :)<\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>SOLVED Fatal error: Call to undefined method Tools::safeDefine() SOLUTION<\/h3>\n<p>Very easy,<\/p>\n<ul>\n<li>You remove the classes folder in the Prestashop Root path. You download same Prestashop version and then you upload classes folder.<span style=\"text-decoration: underline;\"> But it must be same version!<\/span><\/li>\n<\/ul>\n<p>That&#8217;s it!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>PRESTASHOP HATA:<\/strong><\/p>\n<h3>PRESTASHOP Fatal error: Call to undefined method Cart::checkProductsAccess() in<\/h3>\n<p>E\u011fer bu hata ile kar\u015f\u0131la\u015f\u0131rsan\u0131z, Prestashop cache &#8216;i ve taray\u0131c\u0131 cache&#8217; ini temizleyin (tabi yeniden derleme a\u00e7\u0131k olsun) tekrar denedi\u011finizde bu hata gitmi\u015f olacakt\u0131r.<\/p>\n<p>If you meet this error, you should clear the Prestashop cache and browser cache. Of course recompile have to be open.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhabalar, Yine basit bir Prestashop hatas\u0131 ile kar\u015f\u0131 kar\u015f\u0131yay\u0131z ve hemen kar\u015f\u0131la\u015ft\u0131\u011f\u0131m\u0131z hatay\u0131, nedenini ve \u00e7\u00f6z\u00fcm\u00fcn\u00fc payla\u015fal\u0131m. PRESTASHOP HATA: PRESTASHOP ERROR: PRESTASHOP Fatal error: Call to undefined method Tools::safeDefine() in .. Bu hata ile kar\u015f\u0131la\u015f\u0131yorsan\u0131z e\u011fer, Prestashop (\u015fu anki g\u00fcncel versiyon: 1.6.1.0) g\u00fcncel versiyonlardan birisini kullan\u0131yorsunuz ve g\u00fcncelle\u015ftirme yaparak bu versiyona ula\u015ft\u0131n\u0131z demektir. &nbsp; Tools::safeDefine() [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[21],"tags":[589,14,588,587],"class_list":["post-1111","post","type-post","status-publish","format-standard","hentry","category-prestashop-e-ticaret","tag-fatal-error-call-to-undefined-method-toolssafedefine-in","tag-prestashop","tag-prestashop-toolssafedefine","tag-toolssafedefine"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4sbm9-hV","jetpack-related-posts":[{"id":1329,"url":"https:\/\/sahinsolmaz.com\/blog\/prestashop-fatal-error-call-to-undefined-method-htmltemplatedeliveryslipgetpagination-in-classespdfpdf-php-on-line-95\/","url_meta":{"origin":1111,"position":0},"title":"Prestashop  Fatal error: Call to undefined method HTMLTemplateDeliverySlip::getPagination() in \/classes\/pdf\/PDF.php on line 95","author":"SahinSOLMAZ","date":"1 Temmuz 2016","format":false,"excerpt":"Merhabalar, Birka\u00e7 g\u00fcn \u00f6nce Prestashop global forumdan bir arkada\u015f\u0131n ya\u015fam\u0131\u015f oldu\u011fu: Fatal error: Call to undefined method HTMLTemplateDeliverySlip::getPagination() in classes\/pdf\/PDF.php on line 95 sorunu ile ilgili olarak pratik bir \u00e7\u00f6z\u00fcm\u00fc sizlerle payla\u015fmak istiyorum. \u015eikayet konusu \u015fuydu: \"kap\u0131da \u00f6deme methodu ile al\u0131\u015fveri\u015f yap\u0131ld\u0131\u011f\u0131nda beyaz sayfa ile kar\u015f\u0131la\u015f\u0131yorum.\" Asl\u0131nda bildi\u011finiz \u00fczere, beyaz\u2026","rel":"","context":"&quot;Genel&quot; i\u00e7inde","block_context":{"text":"Genel","link":"https:\/\/sahinsolmaz.com\/blog\/category\/genel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1069,"url":"https:\/\/sahinsolmaz.com\/blog\/prestashop-fatal-error-class-smarty_internal_smartytemplatecompiler-not-found-in\/","url_meta":{"origin":1111,"position":1},"title":"Prestashop Fatal error: Class &#8216;Smarty_Internal_SmartyTemplateCompiler&#8217; not found in","author":"SahinSOLMAZ","date":"7 Eyl\u00fcl 2015","format":false,"excerpt":"Merhabalar, Prestashop s\u00fcr\u00fcm g\u00fcncelle\u015ftirmesi yapt\u0131ktan sonra a\u015fa\u011f\u0131daki hata ile kar\u015f\u0131la\u015fabilirsiniz. When you upgrade Prestashop version, you may encounter the following error. Fatal error: Class 'Smarty_Internal_SmartyTemplateCompiler' not found in .. tools\/smarty\/sysplugins\/smarty_internal_template.php\u00a0on line 713 \u00a0 \u00c7\u00f6z\u00fcm olduk\u00e7a basit lakin g\u00fcncel s\u00fcr\u00fcmde LC_CTYPE hatas\u0131 bu \u015fekilde \u00e7\u0131kt\u0131\u011f\u0131 i\u00e7in forumlarda \u00e7\u00f6z\u00fcme ula\u015fman\u0131z biraz zor\u2026","rel":"","context":"&quot;Genel&quot; i\u00e7inde","block_context":{"text":"Genel","link":"https:\/\/sahinsolmaz.com\/blog\/category\/genel\/"},"img":{"alt_text":"Prestashop Logo","src":"https:\/\/i0.wp.com\/sahinsolmaz.com\/blog\/wp-content\/uploads\/2015\/09\/ps_logo_share_prestashop-621x309.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sahinsolmaz.com\/blog\/wp-content\/uploads\/2015\/09\/ps_logo_share_prestashop-621x309.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/sahinsolmaz.com\/blog\/wp-content\/uploads\/2015\/09\/ps_logo_share_prestashop-621x309.png?resize=525%2C300 1.5x"},"classes":[]},{"id":334,"url":"https:\/\/sahinsolmaz.com\/blog\/prestashop-admin-nginx-502-bad-gateway-solved-hatasi-ve-cozumu\/","url_meta":{"origin":1111,"position":2},"title":"Prestashop Admin Nginx (502 Bad Gateway) Solved Hatas\u0131 ve \u00c7\u00f6z\u00fcm\u00fc","author":"SahinSOLMAZ","date":"11 Mart 2014","format":false,"excerpt":"\u00a0G\u00fcncel \u00e7\u00f6z\u00fcm i\u00e7in: http:\/\/sahinsolmaz.com\/blog\/solved-nginx-502-bad-gateway-error-hatasi-ve-cozumu\/ New solve: http:\/\/sahinsolmaz.com\/blog\/solved-nginx-502-bad-gateway-error-hatasi-ve-cozumu\/ \u00a0 Merhaba Arkada\u015flar, Prestashop y\u00f6netim paneline giri\u015f yapmay\u0131 denerken bir g\u00fcn \u015f\u00f6yle bir hata ile kar\u015f\u0131\u015fa\u015f\u0131rsan\u0131z,\u00a0Prestashop Admin Nginx (502 Bad Gataway)\u00a0a\u015fa\u011f\u0131da anlataca\u011f\u0131m basit \u00e7\u00f6z\u00fcm i\u015finize yarayacakt\u0131r. * Sunucu y\u00f6netim panelini (\u00f6rn: Plesk Panel \u2018i) a\u00e7\u0131n,* Ara\u00e7lar ve Se\u00e7eneler (Tools & Settings) sayfas\u0131n\u0131 a\u00e7\u0131n,\u2026","rel":"","context":"&quot;E-Ticaret&quot; i\u00e7inde","block_context":{"text":"E-Ticaret","link":"https:\/\/sahinsolmaz.com\/blog\/category\/e-ticaret\/"},"img":{"alt_text":"Prestashop-Admin-Nginx-502-Bad-Gateway-Solved-Hatasi-ve-C\u00f6zumu","src":"https:\/\/i0.wp.com\/sahinsolmaz.com\/blog\/wp-content\/uploads\/2014\/03\/Prestashop-Admin-Nginx-502-Bad-Gateway-Solved-Hatasi-ve-C%C3%B6zumu-300x168.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":907,"url":"https:\/\/sahinsolmaz.com\/blog\/solvedcozuldu-prestashop-maximum-upload-file-error\/","url_meta":{"origin":1111,"position":3},"title":"Solved\/\u00c7\u00f6z\u00fcld\u00fc &#8211; Prestashop maximum upload file Error","author":"SahinSOLMAZ","date":"3 Nisan 2015","format":false,"excerpt":"Prestashop The limit choosen is superior to the server's maximum upload file You need to improve the limit of your server. Ba\u015fl\u0131kta Prestashop yazsa da\u00a0 \"maximum upload file You need to improve the limit of your server.\"\u00a0 hatas\u0131 genel bir hata (hatay\u0131 veren sistem Prestashop) ve pratik bir \u00e7\u00f6z\u00fcm i\u00e7in;\u2026","rel":"","context":"&quot;PrestaShop&quot; i\u00e7inde","block_context":{"text":"PrestaShop","link":"https:\/\/sahinsolmaz.com\/blog\/category\/e-ticaret\/prestashop-e-ticaret\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1034,"url":"https:\/\/sahinsolmaz.com\/blog\/prestashop-tcpdf-error-image-unable-to-get-image-imgtmpproduct_mini_-solved\/","url_meta":{"origin":1111,"position":4},"title":"PRESTASHOP TCPDF ERROR: [Image] Unable to get image: \/img\/tmp\/product_mini_ SOLVED","author":"SahinSOLMAZ","date":"16 Temmuz 2015","format":false,"excerpt":"Herkese Merhabalar, Uzun bir aradan sonra Prestashop i\u00e7in g\u00fcncel bir bug\/hatan\u0131n (TCPDF ERROR: [Image] Unable to get image: \/img\/tmp\/product_mini_) \u00e7\u00f6z\u00fcm\u00fcn\u00fc h\u0131zl\u0131ca payla\u015faca\u011f\u0131m. TCPDF ERROR: [Image] Unable to get image: \u00c7\u00d6Z\u00dcM\u00dc FIX BUG PRESTASHOP TCPDF ERROR: [Image] Unable to get image: \/img\/tmp\/product_mini_ How to fix this? Anadizin\/classes\/pdf\/HTMLTemplateDeliverySlip.php dosyas\u0131n\u0131 a\u00e7\u0131n, Open the\u2026","rel":"","context":"&quot;PrestaShop&quot; i\u00e7inde","block_context":{"text":"PrestaShop","link":"https:\/\/sahinsolmaz.com\/blog\/category\/e-ticaret\/prestashop-e-ticaret\/"},"img":{"alt_text":"prestashop_TCPDF_ERROR_Image_Unable_to_get_image","src":"https:\/\/i0.wp.com\/sahinsolmaz.com\/blog\/wp-content\/uploads\/2015\/07\/prestashop_TCPDF_ERROR_Image_Unable_to_get_image.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":994,"url":"https:\/\/sahinsolmaz.com\/blog\/solved-prestashopexception-module-is-not-a-valid-module-name-at-line-1461-in-file-classesmodulemodule-php\/","url_meta":{"origin":1111,"position":5},"title":"SOLVED -[PrestaShopException] Module ** is not a valid module name at line 1461 in file classes\/module\/Module.php","author":"SahinSOLMAZ","date":"20 Eyl\u00fcl 2015","format":false,"excerpt":"Selamlar, PrestaShop a\u00e7\u0131k kaynak e-ticaret yaz\u0131l\u0131m\u0131 kontrol paneli mod\u00fcller sayfas\u0131nda bazen, [PrestaShopException] Module ** is not a valid module name at line 1461 in file classes\/module\/Module.php hatas\u0131yla kar\u015f\u0131la\u015f\u0131r\u0131z bunun sebebi bir mod\u00fcl\u00fcn i\u00e7erisinde k\u00fc\u00e7\u00fck bir BUG olmas\u0131ndan kaynaklan\u0131yor ve \u00e7\u00f6z\u00fcm\u00fc kolay olan bu hata bazen \u00e7ok can s\u0131k\u0131c\u0131 olabilir a\u015fa\u011f\u0131daki\u2026","rel":"","context":"&quot;PrestaShop&quot; i\u00e7inde","block_context":{"text":"PrestaShop","link":"https:\/\/sahinsolmaz.com\/blog\/category\/e-ticaret\/prestashop-e-ticaret\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/posts\/1111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/comments?post=1111"}],"version-history":[{"count":9,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/posts\/1111\/revisions"}],"predecessor-version":[{"id":1120,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/posts\/1111\/revisions\/1120"}],"wp:attachment":[{"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/media?parent=1111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/categories?post=1111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sahinsolmaz.com\/blog\/wp-json\/wp\/v2\/tags?post=1111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}