We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17249 ☆ A M B ☆
    • 165 Posts
    Hi Bruno;
    I'm having some issue with migxObjectMediaPath snippet.
    The TV is saving the image filename with "./" in the front.
    This occurs for some reason the second time the tv is modified.

    Please see attached image.
    I've created a another Media Source without migxObjectMediaPath and the filename is being saved correctly in the db.
    Any suggestions?

    Please see attached image.
      • 17249 ☆ A M B ☆
      • 165 Posts
      I noticed if you first click on the top dynamic folder in the open window and then select the image it works ok.
      But if you click to open the window and click directly on a picture the filename is saved with "./" in front

      This happens in linux and windows environments.

        • 4172
        • 5,888 Posts
        yeah, this is an issue with the file-browser adding "./" in some situations when you are at the root.
        What you can do, is to replace the "./" with str_replace on file- and MIGX-fields in the update-processor before saving the object.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 17249 ☆ A M B ☆
          • 165 Posts
                  if(isset($postvalues['content_image'])){
                      $postvalues['content_image'] = str_replace('./', '', $postvalues['content_image']);        
                  }
          


          This will work for now.
          But i'm afraid i will need to add more of these everytime i need an image field in the form.

          Thanks for the help.
          Amazing support for this Extra. [ed. note: lithiumlab last edited this post 13 years, 4 months ago.]