We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42147
    • 15 Posts
    Hi Guys,

    just trying to solve a double action error within my gallery i'am working on.

    i have a module which starts a java-applet for uploading files, the applet calls the module itself with a special querystring during the post in the formaction to activate the uploadhandler-method in the class

    after the applet sends the formdata i get the double action error.

    this is my querystring as formaction: index.php?a=112&id=2&advalbum_action=imagemanager&advalbum_todo=requestupload&advalbum_album=1&SN50aed810730df=ojs0ujf4ejpajjnhdcm3ba43db4or384qqjvsrikpaue4lj9qud1


    thx




      • 28042 ☆ A M B ☆
      • 24,524 Posts
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 42147
        • 15 Posts
        Hello Susan, thanks for your awesome fast reply smiley

        yes also found that over google, but i need the "a" parameter to switch to the modules-screen to pass the "get" parameters to the module to activate the uploadhandler.

        Maybe you wish to have a look at the module-class to figure out what i mean, there is a method called requestUpload(); in advalbum.module.class.php on line 1021 which is started in the background by the javaupload-applet, the applet opens the module with the querystring "a" parameter in the formaction and passes html-postvars as standard formdata, simply said a second modx instance will be opened but only for uploading

        The complete gallery can be downloaded here: http://wiki.012h.de/doku.php?id=en:advalbum:download

        Installationinfo is provided here: http://wiki.012h.de/doku.php?id=en:advalbum:how_to_install_advalbum

        i'am currently out of ideas how to solve this, a separate php file for uploading is also unsuitable since it need access to alot of other methods in the class like imagescaling and database access etc.

        thx
          • 42147
          • 15 Posts
          So, noone an idea?
            • 42147
            • 15 Posts
            Well i figured out what causes modx to reject uploads from my java-applet (JUpload) within my gallery-module in my case, this may also be possible with other client-side upload solutions like flash etc.

            in /manager/index.php around line 190 to 200 you have the following if statement:

            // OK, let's retrieve the action directive from the request
            if(isset($_GET['a']) && isset($_POST['a'])){
            $e->setError(100);
            $e->dumpError();
            // set $e to a corresponding errorcode
            // we know that if an error occurs here, something's wrong,
            // so we dump the error, thereby stopping the script.
            } else {
            $action= (int) $_REQUEST['a'];
            }

            This statement checks also for POST "a" but i don't have any "a" var in my Postvars when i upload, so currently i'm puzzling around why this if statement will catch.
              • 42147
              • 15 Posts
              Solved smiley Lot of thanks for your Help!

              It seems that it is not allowed to pass any action parameter over an URL-Querystring, the upload java-applet now posts the "a" parameter via POST to switch to the modules-screen, works in both evolution and revolution.

              So long, Daniel