We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    No I have nothing in manager log...

    Maybe it’s server config related, don’t know... if you have time and can give a quick look I’ll send you a login/pass !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 23383
      • 138 Posts
      Could you try this for backend ?
      [!FancyUpload?&mode=`backend`&frontendpageid=`239` &uploadpath=`telechargement/` &maxsize=`16777216` &extensions=`jpg,png,gif,pdf,txt,doc,xls,ppt,zip,rar,rtf,txt,odt` &userelpath=`1`!]
      
        • 6726
        • 7,075 Posts
        Just tried, I get the same result...

        Maybe I should set error reporting in index.php ?
        I don’t remember which line I should add, Jason told me once but forgot rolleyes

        If I set stopOnNotice to true in index.php :
        [tt]// Debugging mode:
        $modx->stopOnNotice = false;[/tt]

        I get some charset notice

        [tt]PHP error debug
          Error: Undefined variable: charset
          Error type/ Nr.: Notice - 8
          File: /*******/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php
          Line: 85
          Line 85 source: $charset = $charset ? $charset : $this->config[’charset’]; [/tt]

        but I don’t think it has anything to do with the problem, everyone of my MODx install does this...

          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 23383
          • 138 Posts
          No I don’t think it’s related either.
          Don’t modify the log level, it won’t change anything. If you don’t see something in your manager log, it’s just because nothing is logged :s

          I supposed you have looked at the directory chmod ?
            • 6726
            • 7,075 Posts
            Yes.

            As I have said, if I make the test page public, everything works fine (not changing one thing in my call except removing the &backendpageid of course)
            It’s "just" a problem to set this up for a private page... there must be something I overlooked here...

            The error code, 401 is the http code for unauthorized page, which would make sense if I were not logged but I am logged in and should be able to upload... could it be an issue with sessions, cookies, whatever ?

            If I load a private page without login in, I will get a 401 code analyzing the response header with webdevelopper.
            If I do once logged in, I get 200 (OK).

            Probably some funky server issue with the function canBackendUpload...

              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 23383
              • 138 Posts
              Is the backend page public while the frontend one is private ?
                • 6726
                • 7,075 Posts
                Again on my testing... I just did a test with Safari and I have a different scenario there : upload works, but when I upload the file I get no confirmation that it’s been uploaded and I have to reload the page manually to see the file listed by the FileDownload snippet.

                I’ll keep on doing some test with IE and Opera just to get this sorted !

                Edit : didn’t see your last message...
                Oh my, could this all be because I wanted this page hidden from the client (so that he wouldn’t mess with it) by making it private in the manager (assigned to a special manager document groups for admins) ?

                I’ll try ASAP making it public !

                Edit 2 : Made the backend page public but it didn’t change anything except the progress bar went to 100% before displaying the "Upload failed (401)" message.

                I’ll go on trying with different browsers (IE/Win, FF/Win...)

                Edit 3 : Noticed one thing I didn’t before, the generated code for the upload form does not have anything for RelPath if I am browsing the base folder (I am not in a subfolder)

                [tt]<form action="espace-clients-et-partenaires/test-gestionnaire-de-fichier.html?relPath=" method="post" id="photoupload" enctype="multipart/form-data">[/tt]

                But the relPath is properly set when I click on any subfolder (inside the &uploadpath, [tt]telechargement/[/tt]). Is that normal ?


                So that you get the whole picture, I have a FileDownload call before the FancyUpload call (on the public page with ID 239), and it’s uncached :

                [tt][!FileDownload? &getFolder=`telechargement`  &tplList=`FileDownload-tpl` &browseDirectories=`1` &groupByDirectory=`1` &downloadGroups=`partenaires, pargade` &countDownloads=`0` &imgLocat=`assets/snippets/filedownload/icons` &imgTypes=`fdImages` &delSuccess=`Vous avez effacé : ` &delError=`Une erreur s’est produite lors de l’effacement du fichier : ` &dirOpenError=`Impossible d’ouvrir le répertoire : ` &notaDir=`Ceci n’est pas un répertoire` &noDownload=`Vous n’avez pas la permission de télécharger ce fichier` &hideExt=`html,ico,php,js` &dateFormat=`d/m/Y` !][/tt]

                I tried to cache the FileDownload call, no change

                Again, it works flawlessly with public pages...

                I’ll deactivate the SEO Strict URLs plugin, maybe that’s what interfering with the http headers or something...
                Scratch that, didn’t change anything
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 5489
                  • 1 Posts
                  Hi good day,  I having a problem where is my page keep going to error page "http://www.mydomain.com/index.php?id=26?relPath=" after the uploading process is finished eventho there is no file uploaded into the target folder.

                  Below is my config:
                  [!FancyUpload? &userelpath=`assets/msds/` &extensions=`pdf` &maxsize=`1048576` !]


                  Chunk:
                  <div id="fancyupload_container"></div>
                  <form action="[~[*id*]~]?relPath=[+relPath+]" method="post" id="23" enctype="multipart/form-data">
                  	<input type="file" name="Filedata" id="fancyupload_input_data" />
                  	<div class="halfsize">
                  			<fieldset>
                  					<legend>Queue</legend>
                  					<div class="note" id="fancyupload_status"><p>Please Make Sure your MSDS is in .PDF extension and start upload</p></div>
                  					<ul class="fancyupload_queue" id="fancyupload_queue">
                  							<li style="display: none" />
                  					</ul>
                  			</fieldset>
                  	</div>
                     <div class="footer">
                  			<input type="submit" class="submit" id="profile-submit" value="Start upload"/>
                  	</div>
                   </form>


                  Regards / Gavan
                    • 6726
                    • 7,075 Posts
                    Dumb question : do you use a FileDownload call on that same page ?
                    FancyUpload gets the path from the current folder you’re browsing with FileDownload...
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 36571
                      • 145 Posts
                      Is there a way to insert the path and filename of an uploaded file as a TV?

                      I want web users to be able to upload an image in a document, and then a TV in that document would automatically be set as e.g. "assets/path/exampleimage.jpg"

                      Let me know if this is doable.

                      Thanks