TinyMCE/MCImageManager path problems -
I am making all kinds of strange issues with the path in tinyMCE. I'm not sure if I have to do with MCIme Money, then I will try to summarize my setup:
I've got a net website. Right now the application is rooted
tiny_mce is hosted in ~ / tiny_mce, the image manager plugin ~ / tiny_mce / plugins / imagemanager
~ / upload, where I want the images To be uploaded / managed
 ~ / tiny_mce / plugins / imagemanager / web.config has this key:   in the   So far the best - When I browse with the Image dialog in TinyMCE, I get an image browser and it browses the correct folder   When I select an image the strangeity starts "Insert / Edit Image. In the "Image URL" box on the form She is here:   ../ APPOT / upload / Image.JPG   App? what rubbish? It should not be just "upload / image.jpg"?   This   more   I can not tell whether another is necessary, or doing anything   from where "OT" is coming? I believe its existence is not understandable how to use document_bas_arnal.   If I reset the url prefix in the original setting:   ../ upload / DSCF0546.jpg   Which actually looks a bit closer Any "OT" is not garbled in there, But this is a directory.   Does anyone know what's going on?  & lt; Add key = "filesystem.rootpath" value = "../ .. / code /   add key =" preview.urlprefix "value =" {proto}: // {Host} / ap / / / / gt;  account root is not on the hostname route due to the account (seriously, I should not have had this hardcode ... but this is another issue)  
  tinyMCE.init ({// ..... relative_arls: true, remove_script_host: true, document_base_url: 'http: // localhost / APP /' });   
  mcImageManager.init ({relative_urls: true, remove_script_host: true, document_base_url: 'http: // localhost / APP /'}) ;   , I finally: 
TL; DR
Example Configuration
-  Your Web is 
www.example.comDocumentRoot/ var / www -data / -  You can upload images to 
/ var / www / uploads / images - <<> <
 -   
/ var / www / uploads / images -  set 
preview.urlprefixtohttp://static.example.comCode> (or// static.example.com) 
extended interpretation
when wild 'ds' Rkt is!
 Issue  with Moxiecode_ManagerE is Ngine :: convertPathToURI  which uses a piece of code  $ uri = substr ($ abs_path, strlen ($ root));  where  $ abs_path  is "server" path ( /var/www/uploads/images/image.png ) and  $ root  Is  $ root = $ this- & gt; GetSiteRoot (); . By default, MCIE Scientist tries to "guess" the URL (it estimates incorrect  / var / www-data / ) In my case, I uploaded the files to different servers where the cortal was a bit different. So substr to  $ abs_path  
  substr ('/ var / www / uploads / images / image.png', completely unrelated to Strangel ('/ var) Section has been deleted / Www-data / ')) ==' Ds / image / image page '   To fix this, you must  preview.wwwroot  Config Directive must be set. If set, then it has been returned from getSiteRoot and accordingly it has been snatched. 
  substr ('/ var / www / upload / image / image .png', strlen ('/ var / www /')) == 'upload / image / image.png' Code:    code code: Moxiecode_ManagerEngine :: convertPathToURI  is dumb and it should be fixed, but this solution is sufficient enough. 
 
Comments
Post a Comment