5 Replies Latest reply: Apr 25, 2013 9:04 AM by 1003924 RSS

    Links without session ID containing äöü....

    1003924
      Hi there,
      I have a problem with links containing no session ID, but äöü. I know that a URL can not contain such characters. I have therefore used URL encoding for the characters.

      I built a page, so you can reconstruct my problem:
      http://apex.oracle.com/pls/apex/f?p=17128:1::::::

      Because the problem is related with the session ID, it is not possible to make the page public.
      Therefore i created a user for you:
      Username: dummy
      Passwort: test

      Links testet in my application:
      with session ID(works fine):
      f?p=17128:1:&APP_SESSION.:::1:P1_TEXT:ABC%C3%B6%C3%A4%C3%BC

      without session ID(does not work):
      f?p=17128:1::::1:P1_TEXT:ABC%C3%B6%C3%A4%C3%BC

      For me it looks like apex encodes my %-sign what is nonsense from my point of view.

      I hope you understand my problem.
      It is very inconvenient to access these links from other external systems like emails for example.

      Best,
      Paul
        • 1. Re: Links without session ID containing äöü....
          Denes Kubicek
          Paul,

          I would not invest a minute in trying to solve a problem like that. The real question is why you need to use any characters in the URL? Use some kind of ID numeric values and then get the text value from the database in an on load process or a computation.

          Denes Kubicek
          -------------------------------------------------------------------
          http://deneskubicek.blogspot.com/
          http://www.apress.com/9781430235125
          http://apex.oracle.com/pls/apex/f?p=31517:1
          http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
          -------------------------------------------------------------------
          • 2. Re: Links without session ID containing äöü....
            1003924
            Thanks for your answer even if it is not really helpful.
            I can not use an ID in this case, because the user comes from a search engine and I have to submit the entered string.
            In my view this is a bug in Apex and just avoiding it is not a proper solution.

            Best,
            Paul
            • 3. Re: Links without session ID containing äöü....
              Christian Neumueller-Oracle
              Hi Paul,

              thanks for reporting. I filed bug #16714800 for this. Note that even when this is fixed, you will probably run into problems when the search engine passes characters that are regarded special in a f?p url (":" and ",").

              Regards,
              Christian
              • 4. Re: Links without session ID containing äöü....
                Denes Kubicek
                O.K. it seems that an example explains it better than words. See this:

                https://apex.oracle.com/pls/apex/f?p=31517:289

                I needed five minutes to solve that:

                1. Create Table and other objects:
                CREATE TABLE special_string (str_id NUMBER PRIMARY KEY, str_value VARCHAR2(1024));
                
                CREATE SEQUENCE special_string_seq START WITH 1 INCREMENT BY 1 NOCACHE;
                
                CREATE OR REPLACE TRIGGER special_string_tr
                   BEFORE INSERT
                   ON special_string
                   FOR EACH ROW
                BEGIN
                   SELECT special_string_seq.NEXTVAL
                     INTO :NEW.str_id
                     FROM DUAL;
                END special_string_tr;
                /
                2. Create a public page with a required items and a branch to the actual target page - the branch is setting the item P289_STR_ID to the value of P290_STR_ID element. On submit process is:
                BEGIN
                   INSERT INTO special_string
                               (str_value
                               )
                        VALUES (:p290_str_value
                               )
                     RETURNING str_id
                          INTO :p290_str_id;
                END;
                3. Create a target page with an on load process using the following code - this process is conditional and runs if :P289_STR_VALUE IS NULL:
                BEGIN
                   SELECT str_value
                     INTO :p289_str_value
                     FROM special_string
                    WHERE str_id = :p289_str_id;
                
                   DELETE FROM str_value
                         WHERE str_id = :p289_str_id;
                EXCEPTION
                   WHEN OTHERS
                   THEN
                      NULL;
                END;
                4. Make sure your link points to the public page and contains the following request:
                BRANCH_TO_PAGE_ACCEPT
                5. If you want to hide the page 290 since it is public, create an on load process with the following code - conditional and runs if :P290_STR_VALUE IS NULL:
                BEGIN
                   OWA_UTIL.redirect_url ('f?p=' || :app_id || ':' || 289);
                   apex_application.g_unrecoverable_error := TRUE;
                END;
                Denes Kubicek
                -------------------------------------------------------------------
                http://deneskubicek.blogspot.com/
                http://www.apress.com/9781430235125
                http://apex.oracle.com/pls/apex/f?p=31517:1
                http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
                -------------------------------------------------------------------
                • 5. Re: Links without session ID containing äöü....
                  1003924
                  Thanks for that one!
                  It's a nice workaround!

                  Best,
                  Paul