WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#21622 new enhancement

Validate or sandbox file edits before saving them

Reported by: eschwartz93 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 2.7.1
Component: Themes Keywords: needs-patch
Focuses: administration Cc:

Description

While using the academica theme, I accidentally missed an ending bracket while editing functions/wpzoom-seo.php in the theme editor. This is used as part of a set of pages creating a theme options page on the dashboard. When the function went bad, it caused my entire installation to be unaccessible.

It was necesssary to ftp to fix the error, because even the dashboard was blanked out by a fatal error. Messing something up in the theme should not cut off access to the dashboard.

Attachments (1)

wpzoom-seo.php (3.8 KB) - added by eschwartz93 2 years ago.
missing bracket on line 15

Download all attachments as: .zip

Change History (9)

eschwartz932 years ago

missing bracket on line 15

comment:1 Viper007Bond2 years ago

  • Component changed from General to Administration
  • Summary changed from error in theme broke wordpress to Validate or sandbox file edits before saving them
  • Type changed from defect (bug) to enhancement

comment:2 follow-up: markoheijnen2 years ago

I'm curious if WordPress should do this kind of checking. If someone breaks something when using the editor they ask for it.

Also when changing functions.php and you make a mistake their it would always break wp-admin since functions.php their can be used their. To make it saver for yourself you can create load a file inside functions.php that you only use for the frontend.

comment:3 in reply to: ↑ 2 Viper007Bond2 years ago

We test plugins before we activate them to prevent you from breaking your site by activating a plugin. I don't see the difference with this.

comment:4 markoheijnen2 years ago

Thats true but we don't check if we change a plugin. The way of doing No image "so" attached to Ticket #21622 is different since you want to check something that is loaded by default.

comment:5 Viper007Bond2 years ago

Yep, the implementation would certainly be different, I just meant that we already do a bit of hand-holding so this functionality wouldn't be that big of a departure.

comment:6 c3mdigital22 months ago

  • Component changed from Administration to Editor
  • Keywords needs-patch added
  • Version changed from 3.4.1 to 2.7.1

comment:7 Viper007Bond22 months ago

  • Component changed from Editor to Administration

To the best of my knowledge, the "Editor" component refers to the post editor not the file editor. :)

comment:8 nacin5 months ago

  • Component changed from Administration to Themes
  • Focuses administration added
Note: See TracTickets for help on using tickets.