Opened 9 months ago

Last modified 8 months ago

#21622 new enhancement

Validate or sandbox file edits before saving them

Reported by: eschwartz93 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version: 2.7.1
Severity: minor Keywords: needs-patch
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 9 months ago.
missing bracket on line 15

Download all attachments as: .zip

Change History (8)

missing bracket on line 15

  • 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: ↓ 3   markoheijnen9 months 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   Viper007Bond9 months 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.

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.

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.

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

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

Note: See TracTickets for help on using tickets.