Dirty fix for ImageManager - Version imprimable +- Forum CMS Made Simple FR (https://forum.cmsmadesimple.fr) +-- Forum : Général (https://forum.cmsmadesimple.fr/forum-3.html) +--- Forum : Général (https://forum.cmsmadesimple.fr/forum-10.html) +--- Sujet : Dirty fix for ImageManager (/thread-2436.html) |
Dirty fix for ImageManager - n00pX90 - 05/12/2012 Hi, Here is my quick and dirty fix for the imagemanager in the deletion problem (the 1.11.3 did not fix my problem). The fix in lib/FileManager/imagemanager/Classes/ImageManager.php Line 373 Replace Code : if($key == $path) with Code : if($key == $path || $key == $path."/") The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false; The getDirskeys have "/" at the end but the $r2 not and the compare return false... Dirty fix for ImageManager - jce76350 - 05/12/2012 This did not fix the problem for me But Ok for The problem seems to be in the verification of relative path in line if( !$this->validRelativePath($r2) ) return false; Dirty fix for ImageManager - Jean le Chauve - 05/12/2012 This cannot fix because we have if($path == '/') return true; in line 365 $path.'/' -> // Dirty fix for ImageManager - n00pX90 - 05/12/2012 For your information. Here is my complete validRelativePath method. Which solve the problem on my 1.11.3 install Code : function validRelativePath($path) The condition if($path == '/') is only for the root folder management. The code below this instruction manage all subfolders. Regards, Dirty fix for ImageManager - jissey - 05/12/2012 fix the problem for me...thanks Dirty fix for ImageManager - jce76350 - 05/12/2012 @ n00pX90 This did not fix the problem for me -> I use the SVN 8542 with WAMP windows so are you using - the last SVN rev 8542 ? - or the official 1.11.3 ? @ jissey tu es sur quelle version la 1.11.3 ou la SVN ?? il y a eu des modification entre la 1.11.3 et SVN rev 8542 sur imagemanager Dirty fix for ImageManager - jissey - 05/12/2012 1.11.3 mise à jour 1.11.4 “Fernandina_8509Fr” Dirty fix for ImageManager - jce76350 - 05/12/2012 Code : [== Indéfini ==] sous WAMP ?? j'ai tester un 1.11.3 suus Wamp ça ne marche pas non plus le patch il s'agit bien de supprimer les images du dossier /images uniquement Dirty fix for ImageManager - jissey - 06/12/2012 chez OVH mutu. ---------------------------------------------- Cms Version: 1.11.4 Installed Modules: CMSMailer: 5.2.1 CMSPrinting: 1.0.3 FileManager: 1.4.2 MenuManager: 1.8.4 MicroTiny: 1.2.4 ModuleManager: 1.5.5 News: 2.12.10 Search: 1.7.7 ThemeManager: 1.1.7 Gallery: 1.6 Archiver: 0.2.6 BackupMySql: 0.3.1 UsersGuide: 1.5 Config Information: php_memory_limit: process_whole_template: output_compression: max_upload_size: 64000000 url_rewriting: mod_rewrite page_extension: query_var: page image_manipulation_prog: GD auto_alias_content: true locale: default_encoding: utf-8 admin_encoding: utf-8 set_names: true Php Information: phpversion: 5.3.16 md5_function: On (Vrai) gd_version: 2 tempnam_function: On (Vrai) magic_quotes_runtime: Off (Faux) E_STRICT: 0 E_DEPRECATED: 8192 memory_limit: 128M max_execution_time: 120 output_buffering: 4096 safe_mode: Off (Faux) file_uploads: On (Vrai) post_max_size: 64M upload_max_filesize: 64M session_save_path: /tmp (1777) session_use_cookies: On (Vrai) xml_function: On (Vrai) xmlreader_class: On (Vrai) Server Information: Server Api: cgi-fcgi Server Db Type: MySQL (mysqli) Server Db Version: 5.1.63 Server Db Grants: Impossible de trouver un privilège "GRANT ALL". Cela peut signifier que vous pourriez avoir des problèmes pour installer ou retirer des modules, ou encore l 'ajout et la suppression d'éléments, y compris les pages. ---------------------------------------------- Dirty fix for ImageManager - jce76350 - 06/12/2012 Code : [== Indéfini ==] Sous Windows ?? quelle version ?? cela voudrait dire que le problème se situe uniquement sur les systèmes WAMP sous Windows local Dirty fix for ImageManager - n00pX90 - 06/12/2012 I use the stable release 1.11.3 not the SVN version. And i'm on a Linux shared host. To debug on WAMP, you can echoing the $path and $dirs array then compare the differences in the result. Do something like this after $dirs = $this->getDirs(); Code : $dirs = $this->getDirs(); Dirty fix for ImageManager - jce76350 - 06/12/2012 Citation :I use the stable release 1.11.3 not the SVN version. Ok some modifications are on the last SVN (next 1.11.4) On linux with the last SVN all is OK from ImageManager So The bug is NOT on Linux but only on windows * There is a problem with deleting images in ImageManager in Windows http://dev.cmsmadesimple.org/bug/view/8673 see http://www.cmsmadesimple.fr/forum/viewtopic.php?id=4772 Dirty fix for ImageManager - jissey - 06/12/2012 OVH mutu=linux j'avais ce problème sous Linux. En local avec Wamp, je viens de tester sur 1.11.3 “Darwin” : erreur. => Corrigée avec la solution de n00pX90. Dirty fix for ImageManager - jce76350 - 06/12/2012 Citation :j'avais ce problème sous Linux.Oui mais le problème est uniquement sur la future 1.11.4 (actuellement SVN) et que Sous Windows Et que sous /images pas dans les sous dossiers de/images ben non pour moi ça marche pas c'est le même résultat que Jean echo $path; \/ donc erreur Il y a des \ et / qui se croisent et plante la suppression Dirty fix for ImageManager - jissey - 06/12/2012 je récapitule : Sous Linux avec ta 1.11.4 Sous Windaube avec la 1.11.3 officielle. Dirty fix for ImageManager - jce76350 - 08/12/2012 Proposition à tester sous Win et linux dans \ImageManager\Classes\ImageManager.php function validRelativePath($path) - if($path == '/') return true;// a supprimer + if($path == '/' || $path.'\/') return true; // Nouvelle ligne Merci du retour Dirty fix for ImageManager - Jean le Chauve - 08/12/2012 voir : http://www.cmsmadesimple.fr/forum/viewtopic.php?pid=32882#p32882 Dirty fix for ImageManager - jce76350 - 08/12/2012 discussion fermée suivre sur Tests sur 1.11.4 ImageManager sous Windows |