• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

why does the "dynamic related files" feature not discover my dynamic files ?

Community Beginner ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

I have worked a lot with Wordpress and Joomla where the dynamic related files feature worked great pulling up every file related to every other file - maybe some 300 in total !

Now I have written some dynamic code myself across 20 or so files and what I am finding is that the DW feature is not presenting all the files from the chained  'includes'.  So instead of getting all 20 files I only get say 3: the one I'm viewing, the next in the chain and the .css file.

Also, a perhaps related clue / mystery is I am being offered by DW a 'file' under the name of .$filename.   If I try to us the 'GET' feature in DW it tells me that the file does not exist.

any ideas what is going on and what I'm doing wrong ?

thanks Vincej

TOPICS
Server side applications

Views

3.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

Vincej1657 wrote:

Now I have written some dynamic code myself across 20 or so files and what I am finding is that the DW feature is not presenting all the files from the chained  'includes'.  So instead of getting all 20 files I only get say 3: the one I'm viewing, the next in the chain and the .css file.

It depends how the includes are chained. If they're wrapped in a conditional statement, Dreamweaver won't find them unless the condition equates to true.

The reason that Dreamweaver finds them in Drupal and Joomla! is because the conditions are evaluated by the testing server on the assumption that the home page is loaded.

If your include files are in a particular folder, use Site-Specific Code Hints to scan that folder. I'm not sure if it will add the files to the dynamically related files toolbar, but at least you'll get code hints from them.

Also, a perhaps related clue / mystery is I am being offered by DW a 'file' under the name of .$filename.   If I try to us the 'GET' feature in DW it tells me that the file does not exist.

Sorry, I'm not sure what you're describing there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 28, 2010 Nov 28, 2010

Copy link to clipboard

Copied

David - Thank you for your help. 

With your advice I have adjusted my site specific code hints and I am now getting global variables and my own functions. I am not getting any local variables - should I getting those ? I have looked your Adobe TV for insights.

Secondly, let me elaborate on the $.filename . mystery.   You open Index.php. DW presents the 4 files that go into making up Index.php just like it would in CS4. DW also offers the opportunity to discover dynamic files. OK - I hit 'discover'.  Now it adds one more 'file' on the end of the list called  ".$filename ."   If you click on this I am advised that this 'file' is "not on the local disk" with the offer to "Get"    This fails and a warning is given that the files does not exist.  What I do not get is anything over what CS4 would have given me. The 17 or so remaining files stay invisible.

What is more, DW C5 offers the 'header.php' file but does not offer the 'footer.php' file even though the footer is part of the page and renders completely.

I have read your advice carefully.

I was expecting that DW would scan through my entire site and present every single file in my site just clicking the Index.php. Just like in Joomla / Wordpress. The other 17 files or so are invisible.

Ok, some files are called from conditional statements, so I guess I can not see those ever, unless they resolve to true.

However, I have other files which for example, are called as part of an html <form action = xyz_file.php> Should I not be able to see these ?

I must be doing something wrong as I am not getting any more functionality out of Discover Dynamic Files than what I was getting from CS4.

I'm at a loss, BTW, I have also looked  at the David Gassner Video on Lynda.com and have not got anythign more that what I got from Adobe TV.

all ideas are very gratefully received !

Thanks Vincej

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

Vincej1657 wrote:

With your advice I have adjusted my site specific code hints and I am now getting global variables and my own functions. I am not getting any local variables - should I getting those ?

Code hints for variables are available only in the relevant scope. So local variables should be available only in local scope. However, I have found that Dreamweaver doesn't always give hints for local variables, particularly if you're editing an existing section of code. As I understand it, code hinting is done on the fly. Dreamweaver scans the script to discover the variables, and relies on there being no syntax errors. Editing existing code introduces syntax errors, albeit temporarily, thereby preventing Dreamweaver from parsing the code correctly to discover the local variables. Another problem is the real-time nature of the scanning for variables. Dreamweaver does this in the background. If you're typing quickly, it doesn't have time to register the local variable.

let me elaborate on the $.filename . mystery.   You open Index.php. DW presents the 4 files that go into making up Index.php just like it would in CS4. DW also offers the opportunity to discover dynamic files. OK - I hit 'discover'.  Now it adds one more 'file' on the end of the list called  ".$filename ."   If you click on this I am advised that this 'file' is "not on the local disk" with the offer to "Get"    This fails and a warning is given that the files does not exist.

I have not come across that, but I suspect it has something to do with the way you are including a file using a variable. If the variable isn't interpreted, Dreamweaver has no way of finding the actual file.

DW C5 offers the 'header.php' file but does not offer the 'footer.php' file even though the footer is part of the page and renders completely.

Without knowing how footer.php is related to the file in the Document window, it's impossible to say why this is happening. If it's being rendered in the Document window, it should be recognized as a dynamically related file.

I have other files which for example, are called as part of an html <form action = xyz_file.php> Should I not be able to see these ?

No, that type of relationship is not regarded as being a dynamically related file.

As I understand it, CS5 is capable of the following things that CS4 couldn't do:

  • Finding includes that are more than one level deep.
  • Resolving dynamically generated paths, for example <?php include_once './' . conf_path() . 'settings.php'; ?>.
  • Finding CSS and JavaScript files attached to PHP files that use dynamically generated paths.

The main objective was to solve problems of working with WordPress, Drupal, and Joomla! It sounds as though what you're looking for is a way to access all files that are referenced in some way.

What Dreamweaver currently does is locate the files that are required to display the current page. If you need to pass POST or GET variables to a page to view it in a particular way, you can do so through Live View Options > HTTP Request Settings (use the View menu or the Live View Options button on the Browser Navigation toolbar at the top of the Document window).

If you have suggestions about how dynamically related files and/or code hinting can be improved, submit feature requests through the form at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

Thank you David !

The main objective was to solve problems of working with WordPress, Drupal, and Joomla! It sounds as though what you're looking for is a way to access all files that are referenced in some way.

You're, right - that is what I want. Essentially, when you are debugging an application you want to be able to trace the logical flow of the data and operations from page to page. Furthermore if you find an error to want to be able to trace that error to the exact location on the exact page very quickly. From what I see, Dynamic files Discovery with Live View does not really help me. Maybe I am mistaken. Might you be able to suggest where / how I might source that functionality ?

The ability to include custom frameworks like Zend caused me to draw the conclusion that any frame large or small could be discovered in it's entirety.

The code I refer to is well formulated - it is in fact a cut and paste of a Lynda.com exercise on building a CMS in PHP although it does have some complex references.

Many Thanks Vincej

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

Vincej1657 wrote:

The ability to include custom frameworks like Zend caused me to draw the conclusion that any frame large or small could be discovered in it's entirety.

You get code hints for Zend Framework by setting up site-specific code hints, but you don't get the files listed in the dynamically related files toolbar unless you link a file explicitly. The way that I use ZF is to create scripts that use various ZF components, but I don't want to see them listed in the dynamically related files toolbar. There are just too many of them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

David - Got it, I have not yet used Zend and so I'm clearly new at this,  thanks.

My desire to be able to trace and ID bugs quickly across multiple files - is that something that is achievable ? 

I find myself spending a lot of time trying to locate faults.

tks vj

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

Vincej1657 wrote:

My desire to be able to trace and ID bugs quickly across multiple files - is that something that is achievable ?

Bug tracking is difficult once you have created a complex setup. It's better to test early and often as you develop. That way, it's easier to spot a problem when it first arises, and deal with it straight away.

However, if you're searching for IDs, you should be able to use Dreamweaver's Find and Replace to search files that you have selected in the Files panel, the contents of a single folder, or throughout the site. Click Find All, and the Results panel shows you each instance. Double-click the instance in the Results panel, and Dreamweaver opens the file and places the cursor at the correct point.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 14, 2010 Dec 14, 2010

Copy link to clipboard

Copied

I don't know if you've already discovered this but it does find the dynamic includes properly with wordpress, provided you don't turn on permalinks. WP stores the permalinks in a database. As a result, dreamweaver doesn't know how to follow the URL and permlink structure, which prevents it from looking deeper than index.php. As you said, it finds the obvious includes on index.php but doesn't look further. Once you turn it off, you will be able to open the files that currently say "not found". Just make sure you're allowing DW to create a TMP file so it can build the page and resolve the flow of includes for the final page. Also, check your .htaccess (more about that below).

For local debugging, so you can see the flow of what's being executing at what point and the priority, you should use a plug-in. I use this one:

http://wordpress.org/extend/plugins/hikari-hooks/

Also, if you're using a modified structure or you're unable to see the proper includes (the ones nested deep) make sure you edit your .htaccess so DW can follow the structure properly. Unfortunately, although it scans your structure, it can't always follow it without directions. The below linked post is by WP support. It's for a multi-user setup so you'll need to modify it for your own needs/structure:

http://wordpress.org/support/topic/wpmu-and-dreamweaver-cs5

Once I made all the above changes, DW was able to find the proper includes.

Adobe could do a much better job at helping users troubleshoot this issue. They're promoting CS5 as fully integrated with WP and claim it can resolve dynamic includes but there's absolutely no documentation on how to troubleshoot the errors that everyone encounters when trying to setup DW for WP. Everyone I know has had this problem, and most users give up on even trying to work with DW because the application appears broken when it suddenly can't discover or find any files. Although, I also suspect DW was coded with an older version of WP in mind. A lot has changed with WP's internal workings since CS5 was released, and I suspect WP's approach to permalinks has contributed to DW's confusion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

LATEST

hello,

i too am running across this mysterious .$filename. thing in the related files toolbar. it's driving me crazy. i can't figure out where it's coming from nor how to get rid of it.

i even when thru one page and stripped out all the php & javascript & any links to external files, and its still there! ugh.

if you've figured this out, please lemmeknow.

THANKS.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines