WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#18586 new enhancement

PHP errors in plugin-editor.php do not &scrollto

Reported by: Doggie52 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.2.1
Component: Plugins Keywords: 2nd-opinion
Focuses: Cc:

Description

When invoking a parse error in the plugin editor, one is not scrolled back using the scrollto-parameter. Although trying to parse the error and find the line it is caused at could be overkill, one should at least be scrolled back to the line one last was working on -- this is the most likely place at which the error was caused.

Change History (3)

comment:1 @solarissmoke3 years ago

  • Keywords close 2nd-opinion added

Few thoughts:

  • This will only happen if you're editing an active plugin (which some might say is a bad idea in the first place).
  • We would have to track the last line edited using JS, and in any case there is every chance that someone will have edited several lines, in which case scrolling back to the last edited line isn't much help.
  • The error dump already tells you which line the error occured in - I think this should be sufficient for most developers to work out where to look.

Suggest wontfix?

comment:2 @Doggie523 years ago

  • Keywords close removed

To answer your opinions:

  • Rather irrelevant imho - if you can edit an active plugin then that's the end of the story. If some might say it's a bad idea (which I personally agree it is), then we should let the user know of this OR scrap the option altogether.
  • The tracking is already done, and is not of the last edited line but rather the last position of the cursor. It's more of a help to scroll back to the last position of the cursor than to bring you to the start of the document for the reasons I outlined in the ticket.
  • The code editor shows no line numbers - therefore telling the developer what line the error occurs at will not help.
Last edited 3 years ago by Doggie52 (previous) (diff)

comment:3 @SergeyBiryukov2 years ago

  • Component changed from Editor to Plugins
Note: See TracTickets for help on using tickets.