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

Apply source formatting doesn't work in php file

Participant ,
Jan 22, 2017 Jan 22, 2017

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!

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

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

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
Translate
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

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.

Translate
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

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

It looks like it is a bug.

Translate
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

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
Translate
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

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?

Translate
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

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 is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
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

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

Bert Onstott

[private info removed by Moderator]

Translate
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

Have you tried using CC 2019 ?

Paul-M - Community Expert
Translate
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
LATEST

I’m using it.

Translate
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