5 Replies Latest reply: Jan 3, 2013 2:07 PM by Nancy O. RSS

    Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server

    AdventureLi

      I am currently working in CS5. When I preview the page and select that all depedent files be uploaded to the server the page does not display as expected.

       

      From what I can tell, It appears that  files references within ".inc" files are not recognized and as a result are not PUT to the testing or remote server.  If I copy and paste the contents of the ".inc" file into the main page (removing the include file reference), the page renders correctly and the referenced files are uploaded. 

       

      Example:

      If the following is NOT in a ".inc" file, Dreaweaver, sees the referenced image file ("/images/RequestInfo.gif") and uploads as a dependent file to the testing and/or production servers.owever,

       

      If, however, the following code IS contained within an include file, the image file ("/images/RequestInfo.gif") is not recognized as a dependent file and as such it is neither loaded to the testing server NOR does the page render correctly. The include file is referenced from the main page (index.php) as follows:  <?php include 'main_left.inc'; ?>

       

       

       
              Find a camp  

       

      For reference,

       

      File structure:

       

      images/RequestInfo.gif

      index.php ---- contains <?php include 'main_left.inc'; ?>

      main_left.inc  ---- contains code above referencing the image

       

      Does anyone have anyideas or suggestions?

        • 1. Re: Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server
          John Waller MVP

          From what I can tell, It appears that  files references within ".inc" files are not recognized and as a result are not PUT to the testing or remote server.  If I copy and paste the contents of the ".inc" file into the main page (removing the include file reference), the page renders correctly and the referenced files are uploaded.

          That's correct.

           

          Dreamweaver will recognize dependent files as those referenced in the HTML code e.g. images, external stylsheets.

           

          It will not recognize files referenced by includes since they're usually processed by a server-side script then called by the server.

           

          How is this impacting on your workflow?

           

          In DW's Files panel, can you use the Edit > Select Newer Local or Edit > Select Recently Modified commands instead?

          • 2. Re: Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server
            AdventureLi Community Member

            John,

             

            Thank you for your reply.

             

            The purpose of the .inc files I am using is to call redundant code that is used on a variety of pages.  That code is an assortment of HTML, php and js. 

            If the code inside the .inc file is included within the main document, all referenced files and images are put to the Testing server when dependent files are requested.

             

            The interruption to my workflow happens when the files referenced withing the .inc files are not in the testing server environment.

            Most simplistically images and buttons dont display that clearly should.  They are referenced in teh .inc file but DW doesnt see it to put to testing server  or production server.

             

             

            Another example of workflow interruption happens when I am working to cleanup a site wherein old files are no longer used.  Theoretically, IF all dependent files are put to a testing server...I should be able to start with a clean slate and walk through the website an PUT only the files used.  I would think that DW could handle such a task.

             

             

            What can be done to correct this?

            • 3. Re: Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server
              Nancy O. MVP

              For organizational reasons, I keep my local site files inside my testing server folder.  When I save a file, it's immediately saved on the testing server.   Once less obtacle. 

               

              When I'm ready to go live, I simply transfer all the contents from my testing server to my remote server.

               

               

              HTH,

              Nancy O.

              • 4. Re: Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server
                AdventureLi Community Member

                Nancy,

                 

                I thank you for your response. I agree that for an individual who is well organized and deletes ALL unused files off of the testing server.......your method undoubtedly keeps production systems clean.

                 

                However, If that is what Adobe intented for developers to do, then what is the purpose of having seperate descriptions in Site manager for Local and Testing?

                 


                Similarly, I may have a client who needs some assitance with a single page.  If the getting of the dependent files from their website doesnt GET dependent files within an .inc file, then I have to comb through the code looking for the files that did not pull across.  This is not only costly to the client but also time consuming.

                 

                I cant be the only person who struggles with this issue.

                 

                Other Thoughts?

                • 5. Re: Dependent Files inside of Server Side Include files (.inc) not Put to Testing or Remote Server
                  Nancy O. MVP

                  what is the purpose of having separate descriptions in Site manager for Local and Testing?

                  Because a local testing server is optional.  Static site developers don't need one. Some dynamic site developers don't need one either, particularly if they test on the remote server (which I sometimes do).

                   

                  Have you considered using a utility to clean your site of unused files?

                  http://alt-web.com/Articles/Remove-unused-site-files.shtml

                   

                   

                  Nancy O.