Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.4
    • Labels:
    • Environment:

      Tomcat 7, Apache 2, Windows Web Server 2008 R2

      Description

      Setting file server URL in the upload setting to something different than the Server URL does not seem to work: sources of uploaded images are always rendered as relative to the server URL and are broken.

      BTW, the alt tag is alwaays rendered as "null", eben if a description is provided.

      Again, BTW, should not the text under http://jamwiki.org/wiki/en/Configuration#File_upload_settings read "This value ... will almost always be the same as the server URL value, ... " instead of "This value ... will almost always be the same as the file server URL value, ... "?

        Activity

        Hide
        Ryan Holliday
        added a comment -

        I'll look into the file server URL issue - it's possible this has broken with recent changes as I don't think there is currently a unit test for this case. With respect to the "null" alt tag, can you file that as a separate issue and provide an example of the wiki syntax you're seeing the problem with? Thanks!

        Show
        Ryan Holliday
        added a comment - I'll look into the file server URL issue - it's possible this has broken with recent changes as I don't think there is currently a unit test for this case. With respect to the "null" alt tag, can you file that as a separate issue and provide an example of the wiki syntax you're seeing the problem with? Thanks!
        Hide
        Samuel
        added a comment -

        Thank you Ryan, I will. Should not have mixed two problems in one issue in the first place.

        Show
        Samuel
        added a comment - Thank you Ryan, I will. Should not have mixed two problems in one issue in the first place.
        Hide
        Ryan Holliday
        added a comment -

        I'm going to try to get this fixed today, and will try to get it included in JAMWiki 1.1.4, but just so I understand how critical this issue is, is this issue something that you need fixed as soon as possible, or could it wait another two months for JAMWiki 1.2? I looked at it last night, and it is unfortunately a bit more complex than I had hoped:

        • For whatever reason that property seems to only be used by the filepath parser function. That's obviously a problem.
        • Updating the image URL code to use the value is fairly simple, HOWEVER since installs currently default that value to the server URL then that would mean that sites that have images generated as relative URLs would suddenly see absolute URLs, so additional workaround code will be needed.
        • The message key used to provide help information for that field needs updating, and the field should probably just default empty to allow relative URLs.
        Show
        Ryan Holliday
        added a comment - I'm going to try to get this fixed today, and will try to get it included in JAMWiki 1.1.4, but just so I understand how critical this issue is, is this issue something that you need fixed as soon as possible, or could it wait another two months for JAMWiki 1.2? I looked at it last night, and it is unfortunately a bit more complex than I had hoped: For whatever reason that property seems to only be used by the filepath parser function. That's obviously a problem. Updating the image URL code to use the value is fairly simple, HOWEVER since installs currently default that value to the server URL then that would mean that sites that have images generated as relative URLs would suddenly see absolute URLs, so additional workaround code will be needed. The message key used to provide help information for that field needs updating, and the field should probably just default empty to allow relative URLs.
        Hide
        Samuel
        added a comment -

        Hello Ryan,

        I eventually circumvented the issue by using the same server to deliver images. That means but a minor inconvenicence for me. As far as I am concerned, it is not critical.

        If you have more important things to do, I would possibly even manage to provide a patch, as I will be digging into the code anyway - need some customizing and must understand the internals. But that is by the way. I will gladly wait for JAMWiki 1.2.

        Show
        Samuel
        added a comment - Hello Ryan, I eventually circumvented the issue by using the same server to deliver images. That means but a minor inconvenicence for me. As far as I am concerned, it is not critical. If you have more important things to do, I would possibly even manage to provide a patch, as I will be digging into the code anyway - need some customizing and must understand the internals. But that is by the way. I will gladly wait for JAMWiki 1.2.
        Hide
        Ryan Holliday
        added a comment - - edited

        Revision 3904 should resolve this issue, and the fix should be transparent to installations that are using the same value for "File Server URL" and "Server URL" (that should apparently be most users). I changed the help message key to the following:

        "The base URL for the server that will be serving images and files, such as http\://media.example.com/. If this value is blank then image and file URLs will be generated as relative URLs."

        Unfortunately this meant deleting the existing message key translations, so if there's any chance that you're fluent in German or any other language and can provide a translation that would be a huge help. Also, let me know if you'd like a beta version and I can make one available to test with, although since there are now unit tests for this use-case I'm fairly confident that the problem will be solved with JAMWiki 1.1.4.

        Show
        Ryan Holliday
        added a comment - - edited Revision 3904 should resolve this issue, and the fix should be transparent to installations that are using the same value for "File Server URL" and "Server URL" (that should apparently be most users). I changed the help message key to the following: "The base URL for the server that will be serving images and files, such as http\://media.example.com/. If this value is blank then image and file URLs will be generated as relative URLs." Unfortunately this meant deleting the existing message key translations, so if there's any chance that you're fluent in German or any other language and can provide a translation that would be a huge help. Also, let me know if you'd like a beta version and I can make one available to test with, although since there are now unit tests for this use-case I'm fairly confident that the problem will be solved with JAMWiki 1.1.4.
        Hide
        Samuel
        added a comment -

        I could try to provide German and Russian translations (native speaker in both). Will have a look at your contribution rules first. Is there a deadline for these translations?

        Would be glad to have a beta, yes.

        Show
        Samuel
        added a comment - I could try to provide German and Russian translations (native speaker in both). Will have a look at your contribution rules first. Is there a deadline for these translations? Would be glad to have a beta, yes.
        Hide
        Ryan Holliday
        added a comment -

        Betas for 1.1.4 are available at:

        I've updated jamwiki.org with the latest code, and instructions for adding translations can be found at http://jamwiki.org/wiki/en/How_to_Help#Translations - in this case the "admin.upload.help.serverurl" message key mentioned in the comment above is the only string I am concerned about getting translated for 1.1.4, although not having it translated would definitely not hold up the release (currently scheduled to go out some time this week - I try to do a minor release each month).

        As to contribution rules, the only thing required is that you agree to release any changes under the terms of the LGPL license, and if you would like to be credited in the CREDITS.txt file let me know the name to credit you with.

        Show
        Ryan Holliday
        added a comment - Betas for 1.1.4 are available at: http://jamwiki.org/download/jamwiki-1.1.4-beta1.war (WAR file) http://jamwiki.org/download/jamwiki-1.1.4-beta1-src.zip (source code) http://jamwiki.org/download/jamwiki-1.1.4-beta1-src.tar.gz (source code) I've updated jamwiki.org with the latest code, and instructions for adding translations can be found at http://jamwiki.org/wiki/en/How_to_Help#Translations - in this case the "admin.upload.help.serverurl" message key mentioned in the comment above is the only string I am concerned about getting translated for 1.1.4, although not having it translated would definitely not hold up the release (currently scheduled to go out some time this week - I try to do a minor release each month). As to contribution rules, the only thing required is that you agree to release any changes under the terms of the LGPL license, and if you would like to be credited in the CREDITS.txt file let me know the name to credit you with.
        Hide
        Samuel
        added a comment -

        Done (I assume).

        I was tempted to touch a couple of other keys (there were some grammar and speling issues), but I didn't want to tread on anyone's toes and I hadn't been asked so I desisted Or should I have?

        Show
        Samuel
        added a comment - Done (I assume). I was tempted to touch a couple of other keys (there were some grammar and speling issues), but I didn't want to tread on anyone's toes and I hadn't been asked so I desisted Or should I have?
        Hide
        Ryan Holliday
        added a comment -

        Thanks! I'll get these merged for the next release shortly.

        If there are other keys needing updates then I'd encourage you to make any changes that you feel are needed - there are a huge number of strings to maintain, so I'd be surprised if there weren't some typos that may have been overlooked. In addition, both the German and Russian translation files already have multiple contributors so there isn't a single owner of either file whose toes would be stepped on.

        Show
        Ryan Holliday
        added a comment - Thanks! I'll get these merged for the next release shortly. If there are other keys needing updates then I'd encourage you to make any changes that you feel are needed - there are a huge number of strings to maintain, so I'd be surprised if there weren't some typos that may have been overlooked. In addition, both the German and Russian translation files already have multiple contributors so there isn't a single owner of either file whose toes would be stepped on.

          People

          • Assignee:
            Ryan Holliday
            Reporter:
            Samuel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: