Empty options created by plugin.

Aperta Adatta ai principianti
#240 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
php, wordpress
Ambito
backend

Direzione di ricerca

Inizia alle righe 38-43 di maps-block-apple.php e segui l’init hook del plugin e il flusso di salvataggio della pagina delle opzioni. Riproduci il problema eliminando le opzioni che iniziano con maps_block_apple, aprendo la pagina delle opzioni del plugin e ispezionando il database prima e dopo il salvataggio delle credenziali. Il lavoro è completato quando viene creata solo l’opzione combinata maps_block_apple e non rimangono opzioni vuote.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

On the init hook the plugin creates three empty and unused options:

https://github.com/10up/maps-block-apple/blob/892d85e8a56edf1efd43382ea4d4c90d0859f7f7/maps-block-apple.php#L38-L43

However, the options are stored in a single options maps_block_apple.

Steps to Reproduce
  1. In the database, delete all options beginning with maps_block_apple
  2. Go to the plugin options page
  3. Review the database, the three empty options will have been created
  4. Save the apple maps credentials
  5. The forth option maps_block_apple will have been created.
  6. The other three options will remain empty
Screenshots, screen recording, code snippet

Image

Environment information
  • WordPress 6.8.2-alpha-60224
  • Plugin develop @ 23ff6578c5d434d850d1146e3621c59bc08fbd57
WordPress information
Site Health
``` ` ### wp-core ###

version: 6.8.2-alpha-60224
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%year%/%monthnum%/%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: local
user_count: 5
dotorg_communication: true

wp-paths-sizes

wordpress_path: /vagrant/wp-build
wordpress_size: 690.35 MB (723879706 bytes)
uploads_path: /vagrant/content/uploads
uploads_size: 18.46 MB (19356058 bytes)
themes_path: /vagrant/content/themes
themes_size: directory not found
plugins_path: /vagrant/content/plugins
plugins_size: 4.38 GB (4701026802 bytes)
fonts_path: /vagrant/content/uploads/fonts
fonts_size: directory not found
database_size: 2.63 MB (2752512 bytes)
total_size: 5.07 GB (5447015078 bytes)

wp-dropins (1)

db.php: true

wp-active-theme

name: Twenty Twenty-Five (twentytwentyfive)
version: 1.2
author: the WordPress team
author_website: https://wordpress.org
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates, post-formats, editor-style
theme_path: /vagrant/wp-build/wp-content/themes/twentytwentyfive

wp-themes-inactive (14)

Twenty Eleven: version: 4.9, author: the WordPress team
Twenty Fifteen: version: 4.0, author: the WordPress team
Twenty Fourteen: version: 4.2, author: the WordPress team
Twenty Nineteen: version: 3.1, author: the WordPress team
Twenty Seventeen: version: 3.9, author: the WordPress team
Twenty Sixteen: version: 3.5, author: the WordPress team
Twenty Ten: version: 4.4, author: the WordPress team
Twenty Thirteen: version: 4.4, author: the WordPress team
Twenty Twelve: version: 4.5, author: the WordPress team
Twenty Twenty: version: 2.9, author: the WordPress team
Twenty Twenty-Four: version: 1.3, author: the WordPress team
Twenty Twenty-One: version: 2.5, author: the WordPress team
Twenty Twenty-Three: version: 1.6, author: the WordPress team
Twenty Twenty-Two: version: 2.0, author: the WordPress team

wp-mu-plugins (1)

bypass-ssl-check.php: author: (undefined), version: (undefined)

wp-plugins-active (3)

Block for Apple Maps: version: 1.1.4, author: 10up
Simple Podcasting: version: 1.9.0, author: 10up
User Switching: version: 1.9.1, author: John Blackbourn (latest version: 1.9.2)

wp-plugins-inactive (15)

Ads.txt Manager: version: 1.4.4, author: 10up (latest version: 1.4.5)
Autopost for X (formerly Autoshare for Twitter): version: 2.3.0, author: 10up
Block Catalog: version: 1.6.2, author: 10up
Classic Editor: version: 1.6.7, author: WordPress Contributors
Eight Day Week: version: 1.2.5, author: 10up
Insecure Content Warning: version: 1.2.2, author: 10up
New Relic Reporting for WordPress: version: 1.3.3, author: 10up
Public Post Preview: version: 3.0.1, author: Dominik Schilling
Query Monitor: version: 3.17.2, author: John Blackbourn
Restricted Site Access: version: 7.5.2, author: 10up
Retro Winamp Block: version: 1.3.3, author: 10up
Safe Redirect Manager: version: 2.2.0, author: 10up (latest version: 2.2.2)
Safe SVG: version: 2.3.1, author: 10up
Simple Local Avatars: version: 2.8.3, author: 10up
Simple Page Ordering: version: 2.7.3, author: 10up

wp-media

image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: 1
post_max_size: 1024M
upload_max_filesize: 1024M
max_effective_size: 1 GB
max_file_uploads: 20
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: not available

wp-server

server_architecture: Linux 5.15.0-92-generic aarch64
httpd_software: nginx/1.18.0
php_version: 8.2.27 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 900
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 900
upload_max_filesize: 1024M
php_post_max_size: 1024M
curl_version: 7.81.0 OpenSSL/3.0.2
suhosin: false
imagick_availability: false
pretty_permalinks: true
static_robotstxt_file: false
current: 2025-05-19T01:16:16+00:00
utc-time: Monday, 19-May-25 01:16:16 UTC
server-time: 2025-05-19T01:16:14+00:00

wp-database

extension: mysqli
server_version: 8.0.36-0ubuntu0.22.04.1
client_version: mysqlnd 8.2.27
max_allowed_packet: 16777216
max_connections: 151

wp-constants

WP_HOME: http://xu-osp-plugins.local
WP_SITEURL: http://xu-osp-plugins.local/wp
WP_CONTENT_DIR: /vagrant/content
WP_PLUGIN_DIR: /vagrant/content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: /vagrant/content/debug.log
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: local
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: not writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: does not exist
mu-plugins: writable

</details></summary>

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct
Lingua principale
JavaScript
Stelle
73
Fork
4
Merge medio
33m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di 10up/maps-block-apple

Tutte le issue di 10up/maps-block-apple

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.