Highlighted

Apply Source Formatting not working

Community Beginner ,
Oct 03, 2020

Copy link to clipboard

Copied

When I try to apply source formatting, nothing gets formatted. 

 

Is there any way for me to debug this - to figure you what in my code is causing it to fail?

Views

98

Likes

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

Apply Source Formatting not working

Community Beginner ,
Oct 03, 2020

Copy link to clipboard

Copied

When I try to apply source formatting, nothing gets formatted. 

 

Is there any way for me to debug this - to figure you what in my code is causing it to fail?

Views

99

Likes

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
Oct 03, 2020 0
Adobe Community Professional ,
Oct 03, 2020

Copy link to clipboard

Copied

What kind of file is it? 

If it's HTML, use the built-in validation service.  Go to Window > Results > Validation.  Click on the white triangle to check your document.   Fix all reported errors.

 

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Oct 03, 2020 0
Community Beginner ,
Oct 03, 2020

Copy link to clipboard

Copied

Nancy - It's a PHP file.  There are no errors or warnings reported by validation.  This is not caused by invalid HTML or PHP code. 

Likes

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
Reply
Loading...
Oct 03, 2020 0
Adobe Community Professional ,
Oct 03, 2020

Copy link to clipboard

Copied

Which version of DW?

Did you format PHP tag libraries before running Apply Source Formatting? 

 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Oct 03, 2020 0
Community Beginner ,
Oct 11, 2020

Copy link to clipboard

Copied

It's the latest version. 

i have never looked the code tag libraries. 

I can't imagine that in building the tool there was no debug facility 

Likes

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
Reply
Loading...
Oct 11, 2020 0
Community Beginner ,
Oct 11, 2020

Copy link to clipboard

Copied

I should mention that it works on a stripped down version of the page with only a few lines on HTML, PHP, and Template commands. 

Likes

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
Reply
Loading...
Oct 11, 2020 0
Adobe Community Professional ,
Oct 12, 2020

Copy link to clipboard

Copied

Hi,

 

We need to see the full page/source code really to help with this....  Can you post it?

Paul-M, ACP

Likes

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
Reply
Loading...
Oct 12, 2020 0
LEGEND ,
Oct 12, 2020

Copy link to clipboard

Copied

As far as I know DW doesnt specifically have a debugger for php, you'd have to use something like Xdebug. I dont know if DW has any options for executing Xdebug.

 

On the other hand I doubt debugging has anything to do with applying code source formatting or stopping it from working.

 

Likes

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
Reply
Loading...
Oct 12, 2020 0
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

Is your PHP a pure PHP file or does it contain HTML code?
if it's only PHP, it's been working pretty well (out of the box) for a few versions. then it's a matter of personal wishes and expectations that can easily be edited to refine the result.https://helpx.adobe.com/in/dreamweaver/user-guide.html/in/dreamweaver/using/format-code.ug.html


but as soon as PHP and HTML code is mixed, and depending on your method of block organization, it becomes more peculiar and often messy than we would expect. on this subject, if someone has a solution, I'll take it... thank you 😉

Likes

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
Reply
Loading...
Oct 14, 2020 0