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

Apply source formatting doesn't work in php file

Participant ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

I have an html file with the file extension *.php. It is 95% straight html 5, with a few lines of php. If I choose Edit | Code | Apply Source Formatting, nothing happens. I can understand that DW might not format the php code (i.e., the code within "<?php" and "?>", but it also doesn't format any of the html (e.g., div's, p's, etc). Is this by design? I'm using DW 2017.0.1.


Thanks!

Views

1.4K
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

correct answers 1 Correct answer

Participant , Jan 22, 2017 Jan 22, 2017

I now see this post: Re: (Dreamweaver 2017.0.1) problems with apply source formatting​.

It looks like it is a bug.

Votes

Translate
Community Expert ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Did you define formatting in your Tag Libraries first?

CC-applySourceFormatting.jpg

You might also want to validate code for errors.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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
Participant ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Nancy, I'm unsure what you are asking. If I choose Edit Tag Libraries, the default HTML and PHP tags are defined. I'm not trying to change how it formats the source (i.e., define special formatting). I just want it to format the source (using the default HTML/PHP tag definitions). For example, line up opening and closing div tags.

If I take the same source file and save it with the htm extension, it the Apply Source Formatting does work.


The code does validate.

Thanks.

Votes

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
Participant ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

I now see this post: Re: (Dreamweaver 2017.0.1) problems with apply source formatting​.

It looks like it is a bug.

Votes

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 Expert ,
Jan 22, 2017 Jan 22, 2017

Copy link to clipboard

Copied

Make it known to the development team.  The more requests they get to fix it, the higher its priority.

Bugs with fewer requests get lower priority.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 30, 2018 Dec 30, 2018

Copy link to clipboard

Copied

I have a site where all the file extensions are .php.  When I use Tools/format source code, DW does nothing. I'm using DW CC, 11193 build. 

Is there some setting that can be changed to make this work?  It used to work fine, was disabled when I went to CC.  If it's not a setting, it must be a bug, but I've submitted a bug report which elicited no response.

Help?

Votes

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 Expert ,
Dec 30, 2018 Dec 30, 2018

Copy link to clipboard

Copied

To see the script that formats the PHP code, go to C:\Program Files\Adobe\Adobe Dreamweaver CC 2018\www\extensions\default\BracketsDWBeautify\thirdparty\beautify-php.js

Please start a new topic if you need more assistance.

Wappler, the only real Dreamweaver alternative.

Votes

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 ,
Dec 30, 2018 Dec 30, 2018

Copy link to clipboard

Copied

Sorry but you missed the point. It does not run the script for .php files.

Bert Onstott

[private info removed by Moderator]

Votes

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 Expert ,
Dec 31, 2018 Dec 31, 2018

Copy link to clipboard

Copied

Have you tried using CC 2019 ?

Paul-M - Community Expert

Votes

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 ,
Dec 31, 2018 Dec 31, 2018

Copy link to clipboard

Copied

LATEST

I’m using it.

Votes

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