6 Replies Latest reply on Jul 11, 2018 1:44 AM by gopi.gorantala

    generated js files

    gopi.gorantala

      Hey all,

       

      P.S you can get this information by accessing news page and click on "view page source", scroll to the bottom and you will see the below

       

      reg(["apps/onboarding/views/create_thread"],["/9.0.3.7a1b8fe/resources/scripts/gen/311b17b0a589b57e1c5e6ddd36d3b826.js"]);
      
      reg(["apps/onboarding/views/add_document_collaborator"],["/9.0.3.7a1b8fe/resources/scripts/gen/f1a9e17082caa960e78286f51b8c5a10.js"]);
      
      reg(["apps/onboarding/views/create_private_group"],["/9.0.3.7a1b8fe/resources/scripts/gen/4dd7abcf54cbdfa7ef7799fcdd120243.js"]);
      
      reg(["apps/trial/views/trial_view"],["/9.0.3.7a1b8fe/resources/scripts/gen/be3ef08daf0dd6447462d5f98fbb436e.js"]);
      
      reg(["apps/trial/views/trial_tip_helper"],["/9.0.3.7a1b8fe/resources/scripts/gen/9880b8bdb551cf28d34aa731089faee6.js"]);
      
      reg(["jive/app/core_container/main"],["/9.0.3.7a1b8fe/resources/scripts/gen/5a29eff5cca5a8223a14cc179b952092.js"]);
      
      reg(["apps/onboarding/views/like_content"],["/9.0.3.7a1b8fe/resources/scripts/gen/28134e890079f8de91fadd9466039526.js"]);
      
      reg(["apps/onboarding/views/create_blogpost"],["/9.0.3.7a1b8fe/resources/scripts/gen/217884f356ccb819e733c4076bef5b01.js"]);
      
      reg(["apps/onboarding/views/invite_external_users"],["/9.0.3.7a1b8fe/resources/scripts/gen/8ca568b1ac8170a5c8cfc43ebf9aa3f3.js"]);

       

      the first-entry(  ["apps/onboarding/views/create_thread"]  ) on each line is the JS fileName and the second entry is the compiled minified and generated sources by Google Closures, correct me if I am wrong. Any idea how to override the path from "/9.0.3.7a1b8fe/resources/scripts/gen/" to "/application/9.0.3.7a1b8fe/resources/scripts/gen/"

       

      Question: Does anyone have an idea how these js files are getting rendered..? The reason I am asking is since we are on reverse proxy, the UI clicks are broken and not working. We customized couple lines in javascript to fix one of the reverse proxy issue.

       

      Jens Goldhammer, Matt Collinge, Scott A Johnson - any idea on this ?

       

      -Gopi.

        • Re: generated js files
          mcollinge

          Are you on-prem or hosted & can alter the underlying Java code?

            • Re: generated js files
              gopi.gorantala

              we are on-prem and can customize the java code as well.. any clue ?

                • Re: generated js files
                  gopi.gorantala

                  Sorry, I wasn't clear on the case description on this line below -

                   

                  --  We customized couple lines in javascript.soy to fix one of the reverse proxy issue.

                  • Re: generated js files
                    mcollinge

                    We made some changes to \web\src\main\java\com\jivesoftware\community\web\resource\ResourceUrls.java to help with the /community context we run our site under. You can potentially alter the path inside there.

                     

                    There's also \web\src\main\java\com\jivesoftware\community\web\resource\impl\ResourceUrlModifierImpl.java which we've modified to include cache bust parameters.. and I think you could alter the path there too.

                    1 person found this helpful
                      • Re: generated js files
                        gopi.gorantala

                        Thank you Matt, that was helpful.  We stopped customizing the code for reverse proxy issue and asked one of our internal teams to do the context changes at the data-center level, hoping that will fix the reverse proxy issue we had. I will update this thread on how it goes

                        1 person found this helpful
                          • Re: generated js files
                            gopi.gorantala

                            We fixed this issue.. Instead of customizing the code.. we did add the context on the load-balancer level.

                             

                            In short, we had a source URL with a context. For every hit on this url it is again handshakes with the load balancer(here the context is not passed but the relative path after the "sourceURL context" is passed)...  and that's the reason most of the links are broken and not working. We asked them to add the context at the load balancer level too and that fixed the reverse proxy issue.

                             

                            example view source on the news page..

                            reg(["apps/userpicker/views/select_skill_view"],["/connected/9.0.4.edd1c5d/resources/scripts/gen/7be6431409d1e5020a471f01784a788f.js"]);

                             

                            reg(["apps/static_files/static_file_modal"],["/connected/9.0.4.edd1c5d/resources/scripts/gen/4cb52f563d783f55913d56946ee778d1.js"]);

                             

                            reg(["apps/shared/views/date_picker_view"],["/connected/9.0.4.edd1c5d/resources/scripts/gen/4f3760d5830d6b688d32993cf8161efe.js"]);

                             

                            reg(["apps/places/actions/main"],["/connected/9.0.4.edd1c5d/resources/scripts/gen/6e3979131ffeee1cef8004047d95a951.js"]);

                            1 person found this helpful