tshenry  
                (Taylor)
               
                 
              
                  
                    April 16, 2018, 10:40pm
                   
                   
              1 
               
             
            
              I haven’t had to use this in a while, but a need arose today. I tried on two different sites and am unable to import a theme file through the Themes page of the Admin Panel. When I click on the import button and open the file chooser, all the .dcstyle.json theme files listed are greyed out.
Not sure if anything here could be related:
  
  
    I just tried to import a theme from a file. When I select “from my device” I get the selector and choose the file, but then the “upload” button doesn’t do anything. I tested on two instances Discourse 1.9.0.beta13  and Discourse 1.9.0.beta14. 
Tested Chome and Firefox on Linux.
   
 
Any thoughts?
             
            
               
               
              1 Like 
            
            
           
          
            
              
                simon  
                
               
              
                  
                    April 16, 2018, 10:56pm
                   
                   
              2 
               
             
            
              
If you file chooser has an Options button, click it, and then select All Files. That should let you upload the file.
             
            
               
               
              3 Likes 
            
            
           
          
            
            
              Is this a legit bug or is the UI unclear here?
             
            
               
               
               
            
            
           
          
            
              
                simon  
                
               
              
                  
                    April 16, 2018, 11:05pm
                   
                   
              4 
               
             
            
              It’s a bug, at least in Chrome and Firefox.
             
            
               
               
              3 Likes 
            
            
           
          
            
              
                bartv  
                (Bart )
               
              
                  
                    April 17, 2018, 11:21am
                   
                   
              7 
               
             
            
              As a workaround, in OSX you can also drag the file onto the ‘Choose file’ button:
          
             
            
               
               
              5 Likes 
            
            
           
          
            
              
                sam  
                (Sam Saffron)
               
              
                  
                    April 26, 2018,  4:06am
                   
                   
              8 
               
             
            
            
               
               
              5 Likes 
            
            
           
          
            
              
                riking  
                (Kane York)
               
              
                  
                    April 26, 2018,  6:09am
                   
                   
              9 
               
             
            
              I remember trying to fix this with Data Explorer too… what’s the <input> look like for that?
             
            
               
               
               
            
            
           
          
            
              
                sam  
                (Sam Saffron)
               
              
                  
                    April 26, 2018,  6:17am
                   
                   
              10 
               
             
            
              I hacked this in accept='.dcstyle.json,application/json' it seems to be ok in my vm
             
            
               
               
               
            
            
           
          
            
              
                riking  
                (Kane York)
               
              
                  
                    April 26, 2018,  6:22am
                   
                   
              11 
               
             
            
              Answer:
 return ".json,application/json,application/x-javascript,text/json" + (this.get('extension') ? "," + this.get('extension') : "");
 
https://github.com/discourse/discourse-data-explorer/blob/master/assets/javascripts/discourse/components/json-file-uploader.js.es6#L44-L46 
I think that allowing .json is probably important.
             
            
               
               
               
            
            
           
          
            
              
                sam  
                (Sam Saffron)
                  Closed 
               
              
                  
                    April 27, 2018,  8:00am
                   
                   
              12 
               
             
            
              This topic was automatically closed after 27 hours. New replies are no longer allowed.