If I use the live search macro to find a file, confluence don't download this file if the filename has blank spaces. The macro find the file correctly but if I click on the result I get something like this:
The page you requested could not be found. Possible reasons:
The page does not exist.
The page exists, but you are not authorized to view it.
This is a known bug that hasn't been fixed yet. This is how we have worked around it in our environment. Add this to the "after body" section in custom html in Confluence admin. Just replace the {spakey} and {pagename} sections with your page that has the live search macro ... this keeps it from firing on ever page and possibly causing issues.
<script type="text/javascript"> //This is to bandaid an issue with the livesearch macro where spaces in attachment names are being changed from %20 to %2520. AJS.toInit(function(){ var url = window.location.pathname; if(url.indexOf('display/{spacekey}/{pagename}') != -1) { var runBinderComponentsOld = AJS.Confluence.runBinderComponents; AJS.Confluence.runBinderComponents = function(){ runBinderComponentsOld(); AJS.$('.search-macro li[data-content-type="attachment"] a').each(function(){ this.href = this.href.replace(/%2520/g, '%20'); }); } } }); </script>
Thank you Davin for this work around. I hope Atlassian will fix this problem in the next releases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It still has not been fixed by 5.7.4. Is there an option to fix this with out having to do it for every space? I would rather not have to add this for every space we have or might have in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe it got fixed in 5.8.5 or something like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Davin for this work around. I hope Atlassian will fix this problem in the next releases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guilherme, I'm using Confluence 5.5.1. The URL that confluence wants to open is like:
filename is: "Here we are 04-2014.docx"
https://my.domain.com/mod.wiki/download/attachments/20850248/Here%2520we%2520are%252004-2014.docx?version=1&modificationDate=1407412380318&api=v2
I think the blank space aliases in the URL are wrong:
If I use the global search (for the entire wiki) I get a link with the correct blank space aliases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mark, while testing with Confluence 5.4.4 and livesearch using an imaged named "kamakura 3.jpg" I was able to download the item.
Would it be possible to provide a link to the file in question, along with the Confluence version you are as means to enable further understanding of the scenario?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.