#33874 closed enhancement (worksforme)
Widget not saving new options after updating.
| Reported by: | Kometschuh | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | 4.3 |
| Severity: | normal | Keywords: | close |
| Cc: | Focuses: | administration |
Description
Hello Wordpress.org,
my/our problem is new added default options with true doesn't work after updates?
I added this code below for adding a new option with setting to true (show/hide the title of the Widget).
The code works fine, but when the code comes with a update, the update don't generate the database entry. It means the update make no 'save' or 'initialising'.
https://github.com/mkrdip/category-posts-widget/commit/602ee56f4e364414685b555ab0e7ce1c5b84d012#diff-42e4400fb3d9df303bef84d66f9370e6
After save the Widget or new replacement to the site Widget area the code/Widget works fine.
My recommendation is to make a 'save' after Widget updating!
May be this issue #19 can help to picture our problem:
https://github.com/mkrdip/category-posts-widget/issues/19
Regards
Daniel
Attachments (1)
Change History (7)
#2
@
11 years ago
- Keywords reporter-feedback removed
The debug steps is left to say: An update on how to run it in a new version, can be reached by changing the versioning in the PHP file.
Overwrite or copy over again, the cat-posts.php with the old version 4.1.0, then the 4.1.1. WordPress should again provide an update.
#3
follow-up:
↓ 4
@
11 years ago
I think that what @Kometschuh is trying to say is that there should be an API to be able to update/add settings to a class of widgets at plugin upgrade. It seems like the now the only way to do that is to get the widget's option and manipulate it which is not natural in the context of the widgets API.
#4
in reply to: ↑ 3
@
11 years ago
Replying to mark-k:
I think that what @Kometschuh is trying to say is that there should be an API to be able to update/add settings to a class of widgets at plugin upgrade. It seems like the now the only way to do that is to get the widget's option and manipulate it which is not natural in the context of the widgets API.
To expand the API is a good idea.
"... Maybe the title should be: "API is needed to upgrade widget setting when a plugin upgrade happens"! ..." [Quote from @mark-k at slack.com]
@mark-k Be not angry with me that I quote you here
@Kometschuh First, thanks for submitting!
I think we may need some more information to reproduce the issue. Can you provide steps to reproduce?