{"id":958,"date":"2022-11-11T03:16:15","date_gmt":"2022-11-11T01:16:15","guid":{"rendered":"https:\/\/geekcommunicant.com\/blog\/?p=958"},"modified":"2022-12-07T13:46:08","modified_gmt":"2022-12-07T12:46:08","slug":"fix-phpthumbof-modx-3","status":"publish","type":"post","link":"https:\/\/geekcommunicant.com\/blog\/2022\/11\/11\/fix-phpthumbof-modx-3\/","title":{"rendered":"Fix phpThumbOf with MODX 3"},"content":{"rendered":"\n<p>If like me since you updated to version 3 of MODX your pages using the Extra <a rel=\"noreferrer noopener\" href=\"https:\/\/modx.com\/extras\/package\/phpthumbof\" target=\"_blank\">phpThumbOf<\/a> are not loading anymore, do not panic, I have found a solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why the problem?<\/h2>\n\n\n\n<p>MODX 3 seems to have moved some of its files since phpThumbOf was last updated. The consequence is that the Extra could no more load the library it needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p>You have to edit 2 files. One is accessible through the manager and the second have to be edited via FTP (or SSH if you have access to your server).<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">Via the manager<\/h3>\n\n\n\n<p>Edit the Elements &gt; Snippets &gt; phpthumbof in the manager.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"330\" height=\"427\" src=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/phpthumbof_manager.png\" alt=\"\" class=\"wp-image-960\" srcset=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/phpthumbof_manager.png 330w, https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/phpthumbof_manager-232x300.png 232w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/figure>\n<\/div>\n\n\n<p>You can delete or comment the following code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nif (!$modx-&gt;loadClass(&#039;modPhpThumb&#039;,$modx-&gt;getOption(&#039;core_path&#039;).&#039;model\/phpthumb\/&#039;,true,true)) {\n    $modx-&gt;log(modX::LOG_LEVEL_ERROR,&#039;&#x5B;phpThumbOf] Could not load modPhpThumb class.&#039;);\n    return &#039;&#039;;\n}\n<\/pre><\/div>\n\n\n<p>This code is no more necessary, as modPhpThumb is now always included in MODX.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via FTP<\/h3>\n\n\n\n<p>The file to edit via FTP is, &lt;modx root&gt;\/core\/components\/phpthumbof\/model\/phpthumbof\/phpthumbof.class.php.<\/p>\n\n\n\n<p>In this file, replace line #193 by<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n$this-&gt;phpThumb = new MODX\\Revolution\\modPhpThumb($this-&gt;modx);\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">The end<\/h2>\n\n\n\n<p>And that is it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If like me since you updated to version 3 of MODX your pages using the Extra phpThumbOf are not loading anymore, do not panic, I have found a solution. Why the problem? MODX 3 seems to have moved some of &hellip; <a href=\"https:\/\/geekcommunicant.com\/blog\/2022\/11\/11\/fix-phpthumbof-modx-3\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[26],"tags":[24],"class_list":["post-958","post","type-post","status-publish","format-standard","hentry","category-modx","tag-modx"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2IoOb-fs","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":370,"url":"https:\/\/geekcommunicant.com\/blog\/2014\/07\/07\/ajouter-meta-generator-modx-revolution\/","url_meta":{"origin":958,"position":0},"title":"Ajouter une m\u00e9ta \u00ab\u00a0generator\u00a0\u00bb \u00e0 MODX Revolution","author":"geekc","date":"07\/07\/2014","format":false,"excerpt":"J'ai longtemps cherch\u00e9 \u00e0 rajouter la balise m\u00e9ta \"generator\" \u00e0 mon MODX Revolution, et en fouillant la foisonnante doc de MODX j'ai enfin trouv\u00e9 une solution. Ma solution utilise un snippet (pour aller chercher le num\u00e9ro de version), et un chunk (pour mettre le tout en HTML). Le snippet Le\u2026","rel":"","context":"Dans &quot;MODX&quot;","block_context":{"text":"MODX","link":"https:\/\/geekcommunicant.com\/blog\/category\/modx\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":314,"url":"https:\/\/geekcommunicant.com\/blog\/2014\/03\/30\/pourquoi-choisir-modx\/","url_meta":{"origin":958,"position":1},"title":"Pourquoi choisir MODX ?","author":"geekc","date":"30\/03\/2014","format":false,"excerpt":"Comme je l'ai annonc\u00e9 dans l'article pr\u00e9c\u00e9dent, j'ai choisis d'utiliser MODX pour mon site. Dans cet article je vais vous pr\u00e9senter MODX et vous dire ce qui me l'a fait choisir. Pr\u00e9sentation de MODX MODX est un syt\u00e8me de gestion de contenu (Content Management System en anglais) qui existe depuis\u2026","rel":"","context":"Dans &quot;MODX&quot;","block_context":{"text":"MODX","link":"https:\/\/geekcommunicant.com\/blog\/category\/modx\/"},"img":{"alt_text":"Arbre de ressources MODX","src":"https:\/\/i0.wp.com\/geekcommunicant.com\/blog\/wp-content\/uploads\/arbre_de_ressources.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":417,"url":"https:\/\/geekcommunicant.com\/blog\/2014\/09\/07\/multi-site-modx\/","url_meta":{"origin":958,"position":2},"title":"Le multi-site avec MODX","author":"geekc","date":"07\/09\/2014","format":false,"excerpt":"Gr\u00e2ce \u00e0 son syst\u00e8me de contextes, MODX Revolution permet la gestion de plusieurs sites \u00e0 partir de la m\u00eame installation du syst\u00e8me. Nous allons voir dans cet article comment faire. Le syst\u00e8me de contextes Ce syst\u00e8me permet de clairement s\u00e9parer les ressources dans leur arbres (voir image ci-dessous). La premi\u00e8re\u2026","rel":"","context":"Dans &quot;MODX&quot;","block_context":{"text":"MODX","link":"https:\/\/geekcommunicant.com\/blog\/category\/modx\/"},"img":{"alt_text":"Options contexte","src":"https:\/\/i0.wp.com\/geekcommunicant.com\/blog\/wp-content\/uploads\/options-contextes.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/geekcommunicant.com\/blog\/wp-content\/uploads\/options-contextes.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/geekcommunicant.com\/blog\/wp-content\/uploads\/options-contextes.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":310,"url":"https:\/\/geekcommunicant.com\/blog\/2014\/03\/26\/le-site-nouveau-est-arrive\/","url_meta":{"origin":958,"position":3},"title":"Le site nouveau est arriv\u00e9 !!!","author":"geekc","date":"26\/03\/2014","format":false,"excerpt":"Bon OK, si vous \u00eates all\u00e9s le voir, vous ne constaterez aucun changement, et c'est normal ! La nouveaut\u00e9 n'est ni dans le contenu, ni dans la forme, mais sous le capot. En effet, jusqu'\u00e0 pr\u00e9sent mon site n'avait aucun CMS - sauf bien entendu ce blog ici pr\u00e9sent qui\u2026","rel":"","context":"Dans &quot;Divers&quot;","block_context":{"text":"Divers","link":"https:\/\/geekcommunicant.com\/blog\/category\/divers\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":382,"url":"https:\/\/geekcommunicant.com\/blog\/2014\/08\/15\/menu-mobile-modx\/","url_meta":{"origin":958,"position":4},"title":"Un menu pour mobile avec MODX","author":"geekc","date":"15\/08\/2014","format":false,"excerpt":"Avec la g\u00e9n\u00e9ralisation des terminaux mobiles (smartphones et tablettes) il est important de prendre en compte la taille r\u00e9duite de leur affichage lors de la conception de votre site. Un \u00e9l\u00e9ment essentiel du design d'un site est le menu principal de navigation. Pour les terminaux mobiles, une des solutions est\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"Menu pour smartphone","src":"https:\/\/i0.wp.com\/geekcommunicant.com\/blog\/wp-content\/uploads\/menu-smartphone.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":249,"url":"https:\/\/geekcommunicant.com\/blog\/2013\/08\/28\/looking-for\/","url_meta":{"origin":958,"position":5},"title":"Looking for&#8230;","author":"geekc","date":"28\/08\/2013","format":false,"excerpt":"La nouvelle viens de tomber, mon CDD de webmaster ne donnera pas de suite. Je suis donc \u00e0 nouveau sur le march\u00e9, et suis \u00e0 la recherche d'un nouveau poste de \u00ab webmaster++ \u00bb. Par \u00ab webmaster++ \u00bb j'entend que je sais un peu plus que simplement mettre \u00e0 jour\u2026","rel":"","context":"Dans &quot;Divers&quot;","block_context":{"text":"Divers","link":"https:\/\/geekcommunicant.com\/blog\/category\/divers\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/comments?post=958"}],"version-history":[{"count":0,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts\/958\/revisions"}],"wp:attachment":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/categories?post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/tags?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}