DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

File references 404 unless uploaded through Site Assets

Sort:
You are not authorized to post a reply.
Page 1 of 512345 > >>





Growing Member





    As the title reads, we have been making some updates to our DNN and have run into a problem. Both with individual uploads and module .zip installs, all new content in the form of .html, .js, and image assets are ignored by the system unless I explicitly upload them through the Site Assets feature. Uploading through FileZilla or the azure scm for the site both work, but the pages will serve a 404 whenever we try to access those resources.

    All old modules are still working, and old content is still accessible. Only if the content is changed or new files are uploaded does the site insist they don't exist. I've added .html and .js files to the "allowed extensions" to let me upload through Site Assets which works fine for some simpler pages, but I can't get the DesktopModules/Scripts that way to update the .js files.

    I've run into a similar situation in the past when I needed to serve up .mp4 files and all that took was allowing .mp4 extensions and updating the MIMEType in webconfig, but I've just had this issue occur for a new jpeg and those are already allowed.

    Current MIMETypes in config are ".mp4," ".m4v", ".svg", ".woff". 

    The site is running 9.6.1 and is one of several independent installs we have of simple sites, all of which are hosted by azure. They were all upgraded to 9.6.1 at the same time and none have exhibited this issue until this individual site the last week. None of the others are having issues.

    This restriction is making it impossible to update old modules or deploy new ones as DNN simply ignores any script changes or additions to modules. My next step is to take a shot in the dark and map html and js in MIMETypes carefully to see if that changes anything. Any other guidance would be very helpful as development is dead in the water currently.

    Thank you.






    Veteran Member





      After upload files by external methods, you need to go to the file manager and "synchronize" the files. This is an option in the File Manager.

      Any files you upload must be recognized (by their extensions) by DNN. You configure that in the Persona Bar's Security/More/More Security Settings Persona Bar page.

      Mime types do need to be configured correctly so the IIS will serve them up, but you also need to tell DNN which are legal file types. This is set up so that "any old" file type cannot be uploaded unless admins permit it.

      And, are you really loading HTML pages into DNN?
      Joe Craig
      DNN MVP
      Patapsco Research Group





      Veteran Member





        Posted By Joe Craig on 02 Nov 2020 08:17 PM

        And, are you really loading HTML pages into DNN?

        Right, I was thinking the same, what's the use case for that?

         

         






        Growing Member





          Posted By Joe Craig on 02 Nov 2020 08:17 PM
          After upload files by external methods, you need to go to the file manager and "synchronize" the files. This is an option in the File Manager.

          Any files you upload must be recognized (by their extensions) by DNN. You configure that in the Persona Bar's Security/More/More Security Settings Persona Bar page.

          Mime types do need to be configured correctly so the IIS will serve them up, but you also need to tell DNN which are legal file types. This is set up so that "any old" file type cannot be uploaded unless admins permit it.

          And, are you really loading HTML pages into DNN?

           

          Thanks for your reply. Is a module install through Extensions -> Install Extension considered an "external method"? It doesn't seem that way to me, but like I said it is ignoring new .js files that are part of module installs. That's a bigger issue at the moment than uploading external assets.

          I can see th"Synchronize this folder and subfolders" in the File Manager which will be useful but it's not going to reach DesktopModules/Scripts for new modules, since that directory is not part of the File Manager.

          As for uploading HTML files, there's exactly one page on the site using an old module called HTMLDirect that displays an HTML file from the directory instead of going through the editor. It's been around since before I took over managing this particular instance. My understanding was the HTML editor module was giving the original developer trouble and they no longer wanted to butt heads with it. 

          EDIT: Using "Sync this Folder" in Site Assets is currently not loading any of the extra external files or old files in the directory into site assets. Not a big roadblock as it's easy enough to upload anything I'll need through Site Assets except for the module development part of the issue -- but this behavior may point to the larger problem?






          Veteran Member





            You are right that files installed with an extension are not covered by my previous post. I guess I misunderstood the question.

            Can you explain more about how those files are ignored? How are you loading them or otherwise trying to use them? And, are the files actually installed where you want them to be installed? And where is that? Are your js files installed in DesktopModules/scripts or in DesktopModules/ModuleName/scripts?
            Joe Craig
            DNN MVP
            Patapsco Research Group





            Growing Member





              Posted By Joe Craig on 03 Nov 2020 10:25 AM
              You are right that files installed with an extension are not covered by my previous post. I guess I misunderstood the question.

              Can you explain more about how those files are ignored? How are you loading them or otherwise trying to use them? And, are the files actually installed where you want them to be installed? And where is that? Are your js files installed in DesktopModules/scripts or in DesktopModules/ModuleName/scripts?

              Well, there were some non-extension files that were being ignored too, so your previous post was helpful!

              As for the extensions, they're nothing too complex and are the same format we've been using for a while. We will develop an extension, usually some .cs and .js code to load up a view to display some charts or other content. The module will be placed on a page and use an .ascx view to load some HTML which in turn loads the .js using the

               

              <script> tag. In that sense they&#39;re just customized views using a .js library to do some nice charting.</p>

              The modules are all built and packaged using Cristoc's DNN module project for visual studio so there's a bit of automation there, but the end result is the module will install into DesktopModules/ModuleName and then yes, the .js files are placed in DesktopModules/ModuleName/Scripts (my mistake by previously saying DesktopModules/Scripts).

              I noticed the "ignoring" problem when deploying an update to two separate pages last week. In the case of modules, I have both installed an update to a module we are using by changing the .js and also installed a new module. New .js will 404, changes to old .js will simply be treated as if it still has the contents of the old .js file.

              Here's the general behavior:

              • Installing new modules will load the HTML and views, but 404 the .js references in the HTML.
              • Updating old modules will be ignored and the referenced files will continue to function as if they had not been updated.
              • Uploading new .jpeg, .html, etc through means other than Site Assets will be 404'd.
              • Updating existing .jpeg, .html, etc by changing filename or changing contents of the file will be treated as if their contents were unchanged
              • Anything uploaded through the azure scm, FileZilla, or through installing a module will not be recognized. 
              • Anything uploaded with Site Assets is not ignored and can be used as normal.

               






              Veteran Member





                Are there any errors in the Console window?

                Does CTRL-F5 help?

                Does clearing the cache (see Servers) help?

                What happens if you clear the browser cache?

                Are you doing any other caching?
                Joe Craig
                DNN MVP
                Patapsco Research Group





                Growing Member





                  Posted By Joe Craig on 03 Nov 2020 10:49 AM
                  Are there any errors in the Console window?

                  Does CTRL-F5 help?

                  Does clearing the cache (see Servers) help?

                  What happens if you clear the browser cache?

                  Are you doing any other caching?

                  No other errors in the console window on Chrome, Edge, or Firefox. Just the usual 404 message pointing at the .js file I'm trying to use.

                  CTRL-F5 to clear the cache, clearing DNN's cache through the Servers options, and even clearing the browser cache of everything but history doesn't help. 

                  No other caching to my knowledge. The site is hosted in Azure but we're running plenty of other sites on the same DNN version in azure that aren't showing this problem. The modules I'm trying to use all install and run fine on my local test install. The issue, whatever it is, seems to be localized to just this site.

                   

                   






                  Veteran Member





                    For that js file, can you load is using the url?
                    Joe Craig
                    DNN MVP
                    Patapsco Research Group





                    Growing Member





                      When accessing via URL I am treated to "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

                      You are not authorized to post a reply.
                      Page 1 of 512345 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved