WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 5 months ago

#18586 new enhancement

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

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

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 solarissmoke22 months 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 Doggie5222 months 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 22 months ago by Doggie52 (previous) (diff)

comment:3 SergeyBiryukov5 months ago

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