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

Dreamweaver breaks PHP code

New Here ,
Jul 22, 2020 Jul 22, 2020

Copy link to clipboard

Copied

 I will write through a translator. Adobe Dreamveaver breaks PHP code in many places when formatting. How to COMPLETELY disable PHP code formatting, but leave HTML formatting ???

 

And this is just what I noticed !!! I tried to set it up via https://helpx.adobe.com/en/dreamweaver/using/format-css-code.html But it didn't work for me. How to disable incorrect php formatting? I used to have an old DREAMVEAVER 2015 and everything worked fine on it

Views

836

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 Expert ,
Jul 22, 2020 Jul 22, 2020

Copy link to clipboard

Copied

Are you talking about unwanted spacing or is it completely breaking your code?

What version of Dreamweaver are you using? More recent versions of Dreamweaver had fixed a lot of issues with PHP formatting.

Dreamweaver uses JS Beautify and a PHP plugin, on Wndows for example look here: C:\Program Files\Adobe\Adobe Dreamweaver 2020\www\extensions\default\BracketsDWBeautify\default.jsbeautifyrc - at the bottom see the PHP options.

 

Make a backup before editing, you can also put .jsbeautifyrc file in you project root with your custom settings.

Paul-M - Community Expert

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 Expert ,
Jul 22, 2020 Jul 22, 2020

Copy link to clipboard

Copied

What kind of document is it?

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
New Here ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

I have the latest licensed version installed. Thanks for the answers, I want to completely disable PHP formatting, leaving only HTML and CSS formatting. Regardless of the type of file, since my code may be mixed.

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 Expert ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

I'm not aure how easy that would be to disable PHP formatting alone .... You could use the format selection option

Paul-M - Community Expert

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
New Here ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

I tried adjusting the formatting, it keeps messing up my code anyway. And how should I be?

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
New Here ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

It is fashionable to at least make it so that he does not transfer these lines and does not add these unnecessary spaces !!!

test1.pngtest2.png

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 Expert ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

This will fix some of the spacing:

 

 Make a backup of C:\Program Files\Adobe\Adobe Dreamweaver 2020\www\extensions\default\BracketsDWBeautify\default.jsbeautifyrc

Then edit the PHP options:

 

"php": {
"eol": "\n",
"preserve_newlines": true,
"max_preserve_newlines": 3,
"space_after_anon_function":false,
"brace_style": "collapse",
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": false,
"break_chained_methods": false,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"wrap_attributes": "auto",
"end_with_newline": false,
"comma_first": false,
"space_in_paren":false
}

Paul-M - Community Expert

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
New Here ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

This does not solve my problem, I just tried

 

"php": {
"eol": "\n",
"preserve_newlines": true,
"max_preserve_newlines": 3,
"space_after_anon_function": false,
"brace_style": "collapse",
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": false,
"break_chained_methods": false,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"wrap_attributes": "auto",
"end_with_newline": false,
"comma_first": false,
"space_in_paren":false
}

 

The result is messing up my code anyway:

test4.png

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 Expert ,
Jul 23, 2020 Jul 23, 2020

Copy link to clipboard

Copied

Make sure to report the bug here: https://dreamweaver.uservoice.com/forums/382851-adobe-dreamweaver-bugs

Be sure to note:
The exact DW version, down to the language installed
OS and version
The exact steps to replicate the problem.

This one has been squashed in the past and seems to have made a comeback.

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
New Here ,
Jul 29, 2020 Jul 29, 2020

Copy link to clipboard

Copied

They are deceiving me. I waited 48 hours, they didn't even try to solve my problem. Then they offered to connect to the server via SFTP! What does server connection and code formatting have to do? I have been using this program for over 10 years, it has completely deteriorated, I will demand a refund of my funds. They promise, then all over again, they apparently do not even understand programming and do not see the problem point-blank. How can people not versed in code solve such problems and make such programs?

 

Here's what they answered me a week ago:

ответ1.png

Here's what they answer me today:

Ответ2.png

This is complete nonsense. I cannot spend so much of my time solving problems with the program.

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 Expert ,
Jul 29, 2020 Jul 29, 2020

Copy link to clipboard

Copied

I'm sorry for your poor experience. You're right about one thing.  Online chat agents don't build the software and they don't use it.  Their job is to handle billing, installation and account activation issues.  What they can't handle directly is supposed to be directed to more knowledgeable technical support engineers.  Obviously, there is a shortage of those, no doubt because of the Covid-19 pandemic.

 

#1 File an official bug report from your Help Menu.  Hopefully the engineers will be able to recreate the problem and send out an incremental update to fix it in the the coming weeks. 

 

#2 Uninstall your current version and revert to the previous one.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
New Here ,
May 12, 2023 May 12, 2023

Copy link to clipboard

Copied

Has there been a solution to my problem?

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 Expert ,
May 12, 2023 May 12, 2023

Copy link to clipboard

Copied

Since 2021, Dreamweaver has received only minimal updates -- mostly security and compatibiliy patches.  See link below for more details.

https://helpx.adobe.com/dreamweaver/using/whats-new.html

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
Adobe Employee ,
May 12, 2023 May 12, 2023

Copy link to clipboard

Copied

Hi @kamsar,

Thanks for your follow-up on this behavior. As a workaround, can you please try adding an extra comma at the end of php section of this file: <installed Dw folder location>\www\extensions\default\BracketsDWBeautify\default.jsbeautifyrc and confirm if PHP code formatting gets disabled and your required behavior is achieved.

Refer screenshot:

Screenshot 2023-05-13 at 02.23.42.png

 

Have a pleasant day!

 

Regards,

Nayan

Dreamweaver Team

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
New Here ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

LATEST
Hello, thanks for your help. I did this - but it didn't help me.
I think it's not php formatting - DW doesn't understand that it's php and uses some other formatting, what do you think it could be? Can you try formatting such code at home - and decide how to get rid of such code formatting?

Here is an example:
<?
require_once('chighload.php');
\Bitrix\Main\Loader::includeModule('vlads.admin');
\Bitrix\Main\Loader::includeModule('vlads.system');
\Bitrix\Main\Loader::includeModule('vlads.social');
\Bitrix\Main\Loader::includeModule('vlads.smtp');
?>

 

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