Uploaded image for project: 'Magnolia Diff Module'
  1. Magnolia Diff Module
  2. MGNLDIFF-111

Version Comparison URL Bug when no .html ending is supported

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Download the httpd.zip file.
      2. Unzip it
      3. Run in the unzipped directory:
        $ docker build -t httpd-proxyenabled .
        
        $ docker container run \                                    
        --publish 90:80 \
        -d --name apacheserver \
        httpd-proxyenabled
        
      4. First command will build the image and second will start the apache httpd proxy and will forward it to the port 90 to the host machine.
      5. Edit /etc/hosts and add 127.0.0.1    example.com
      6. Start up Magnolia DX Core
      7. Open admincentral at http://example.com:90/magnoliaAuthor
      8. Publish /travel few times
      9. Compare versions in the Pages app

      Expected results

      The Diff module shows changes between versions

      Actual results

      An empty screen is shown with apache httpd error.

      Workaround

      N/A

      Development notes

      The VersionDiffHtmlServlet.java forces the html ending (hardcoded), it should be taken dynamically from config (e.g, from defaultExtension attribute)

      VersionDiffHtmlServlet.java
      private String getSourceUrl(HttpServletRequest request, String contentHandle) {
          String baseUrl = StringUtils.substringBefore(request.getRequestURL().toString(), SERVICE_PATH);
          return baseUrl + contentHandle + ".html";
       }
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              jsimak Jaroslav Simak
              ccantalapiedra Carlos Cantalapiedra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 0.5d
                    0.5d