Make WordPress Core

Opened 15 years ago

Closed 2 years ago

#9175 closed enhancement (wontfix)

Admin Option Page lacks Infos about serialized Option Values

Reported by: hakre's profile hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

WordPress iteself and many other Plugins store option-values as a so called "serialized string".

WordPress Admin has got a Page that displays all Options:
/wordpress/wp-admin/options.php

With this Page, many of those can be viewed and edited. But: The options that are stored as serialized values can not be edited nor viewed.

That means, if an Administrator want to get a view on the values, she/he needs to take a database viewer at least. And then the serzialized values are a very long string, rendering this very unusefull.

Therefore, this enhancement adds functionality to the Options Page sothat serialized values can be viewed. This is very usefull for example to analyse your setup.

The current motivation and why I'd like to see this in fast, is because of the problems that resulted with the current no-control situation to see which plugins are really activated through options . For example as describben in #9164.

Attachments (12)

9175-options-serialoption-viewer-patch.txt (8.1 KB) - added by hakre 15 years ago.
Patch that enables infos and viewing of serialized values
9175-options-serialoption-viewer.patch (8.1 KB) - added by hakre 15 years ago.
Patch that enables infos and viewing of serialized values
9175 - WordPress › Einstellungen — WordPress_1235056783266.png (32.5 KB) - added by hakre 15 years ago.
Screenshot 1
9175 - WordPress › Einstellungen — WordPress_1235056804240.png (29.5 KB) - added by hakre 15 years ago.
Screenshot 2
9175 - WordPress › Einstellungen — WordPress_1235056842410.png (43.9 KB) - added by hakre 15 years ago.
Screenshot 3
9175-options-serialoption-viewer-fix1.patch (8.1 KB) - added by hakre 15 years ago.
fix the warning thrown by an undefined variable setting.
9175.diff (1.3 KB) - added by Denis-de-Bernardy 15 years ago.
simpler patch
9175.2.diff (1.3 KB) - added by Denis-de-Bernardy 15 years ago.
refreshed against 11256
9175.patch (7.4 KB) - added by hakre 15 years ago.
refresh against 11635
9175.2.patch (7.4 KB) - added by hakre 14 years ago.
refreshed patch against 12031 - fixed cheatin' uh on "-" in option name
9175.3.patch (8.4 KB) - added by hakre 14 years ago.
Refreshed against current trunk.
9175.3.diff (1.1 KB) - added by MZAWeb 12 years ago.
Updated 9175.2.diff for 19712

Download all attachments as: .zip

Change History (42)

@hakre
15 years ago

Patch that enables infos and viewing of serialized values

@hakre
15 years ago

Patch that enables infos and viewing of serialized values

#1 @hakre
15 years ago

Added the Patch (use the .patch file instead .txt for highlighting) and 3 Screenshots giving an impression of the changed. Serialized Values get now a Button to be clicked to get to a second page that displays the serialized content.

The Size of serialzed entries is added as well to give some more info.

#2 @FFEMTcJ
15 years ago

  • Milestone changed from 2.7.2 to 2.8

Postponing enhancements to 2.8

#3 @hakre
15 years ago

You call it an enhancement, I call it a fix. Anyhow it is called, it right now helps in case of configuration problems / fixing wordpress installations and therefore I would really love to see it in 2.7.2. Otherwise there is need of an additional Fix in the Admin Plugin page.

#4 @hakre
15 years ago

  • Keywords has-patch added

There is need to add the "has-patch" keyword if a Ticket has a patch. Did not know that, therefore I added it now.

@hakre
15 years ago

fix the warning thrown by an undefined variable setting.

#5 @hakre
15 years ago

  • Keywords second-opinion added

@Denis-de-Bernardy
15 years ago

simpler patch

#6 @Denis-de-Bernardy
15 years ago

simpler patch attached

#7 @hakre
15 years ago

I had something like that first as well but the problem is, that the page will load a lot of data and the serialized data is displayed "as is" which means quite unreadable especially with larger strings.

#8 @Denis-de-Bernardy
15 years ago

  • Keywords tested commit added; second-opinion removed

commit, wontfix?

@Denis-de-Bernardy
15 years ago

refreshed against 11256

#9 @Denis-de-Bernardy
15 years ago

  • Keywords early added
  • Milestone changed from 2.8 to 2.9

this can wait

#10 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch tested commit early removed
  • Milestone changed from 2.9 to Future Release

needs a refresh

@hakre
15 years ago

refresh against 11635

#11 @hakre
15 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 2.9
  • Version set to 2.8

Refresh.

#12 follow-up: @Denis-de-Bernardy
15 years ago

I still think the second screen is a bit overkill. ;-)

#13 @dd32
15 years ago

I still think the second screen is a bit overkill. ;-)

Bet you wont be saying that when you see all the transients displayed inline taking up 500KB...

#14 @Denis-de-Bernardy
15 years ago

Good point. :D

#15 in reply to: ↑ 12 @hakre
15 years ago

Replying to Denis-de-Bernardy:

I still think the second screen is a bit overkill. ;-)

Depends on the option. But I won't rate that overkill. If the option has much data, it will be listed there. Maybe considering limits for depth and item size (compare to xdebug var_dump optins) might be considerable in a future iteration of this enhancement.

#16 @hakre
14 years ago

  • Keywords developer-feedback added

I still have the modification in one install pretty much working. Any chance to see that in?

#17 follow-up: @azaozz
14 years ago

The latest patch seems to show Cheatin' uh? a lot. This would make a nice plugin if it had the ability to edit these arrays (maybe with var_export() for multi-dimensional arrays, etc.) or at least delete them. Of course editing would need to check the array in a sandbox before saving similar to how plugins are checked on activation.

Perhaps we can display the size and add an action that runs on serialized options on that screen to allow plugins to handle them.

#18 @hakre
14 years ago

I need to take a look if it still applies clean, but having even this (read-only) display in core helps a lot. For example if you face bugs like #10954 on a live site. I do not understand the fuzz why to not have it in in this basic version. It actually does help me a lot.

#19 in reply to: ↑ 17 @hakre
14 years ago

Replying to azaozz:

The latest patch seems to show Cheatin' uh? a lot.

I could not reproduce that, in any case that the older patch shouldn't apply cleanly any more I just freshed it against current trunk.

@hakre
14 years ago

refreshed patch against 12031 - fixed cheatin' uh on "-" in option name

#20 @hakre
14 years ago

Now I could reproduce on option names containing a minus. Updated the patch to reflect that.

#21 @scribu
14 years ago

IMO, this should be handled by a plugin (faster iterations, more flexibility, less core bloat).

#22 @cnorris23
14 years ago

9175.2 works as of 12144. I like the UI for this, but I agree with scribu, that it might be better as a plugin.

#23 @ryan
14 years ago

  • Milestone changed from 2.9 to Future Release

#24 @Denis-de-Bernardy
14 years ago

  • Keywords health-check added; developer-feedback removed

maybe this ought to go in health check?

#25 @Denis-de-Bernardy
14 years ago

  • Keywords health-check removed

@hakre
14 years ago

Refreshed against current trunk.

#26 @hakre
14 years ago

For those interested, updated patch against current trunk, was broken.

#27 @MZAWeb
12 years ago

  • Cc MZAWeb added

@MZAWeb
12 years ago

Updated 9175.2.diff for 19712

#28 @nacin
12 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

#29 @apedog
4 years ago

  • Resolution maybelater deleted
  • Status changed from closed to reopened

I was going to open a ticket asking for this feature. So I'm re-opening this ticket that was closed 8 years ago as maybelater. Maybe maybelater can become maybesoon :P

I find the options.php page to be very useful. A lot easier than working with phpMyAdmin in many cases.

Having the option to at least view the serialized data would be really useful. JSON-encoded data shows in options.php page, so why not serialized data?
Editing would be a +1
Ability to beautify array would be another +1
Ability to beautify JSON would be a cherry on top.

#30 @johnbillion
2 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Re-closing due to continued lack of interest. Can be reopened if somebody wants to shepherd a patch.

Note: See TracTickets for help on using tickets.