Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Token editor scripts accidentally loaded in FSE themes

オープン
#792 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
php
領域
backend, payments

調査の方向性

/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php から始めて、enqueue_scripts_styles()、特に現在の画面のチェックを確認します。gateway が有効な FSE テーマのケースを再現し、その場合に token editor のスクリプトの読み込みが試行されず、uncaught module error が表示されなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

説明

Hey there 👋

When a gateway is active, the token editor scripts from the SV framework are attempted to be loaded in FSE themes, causing an uncaught error in console. Normally this doesn't affect functionality (at least in the gateways I saw this showing up) but all errors are raised to the developer. Still, it should be fixed:

Image
Uncaught ReferenceError: module is not defined
    at sv-wc-payment-gateway-token-editor.js?ver=1717151442:1:3213

Investigate fix (/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php):

  /**
   * Load the editor scripts and styles.
   *
   * @since 4.3.0
   */
  public function enqueue_scripts_styles() {

        $screen = get_current_screen();

        if ( ! $screen || ! in_array( $screen->id, [ 'profile', 'user-edit' ], true ) ) {
                return;
        }

        //... rest of the method as is

hope this is helpful

cheers!

主要言語
PHP
スター
146
フォーク
43
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

godaddy-wordpress/wc-plugin-framework のほかの issue

godaddy-wordpress/wc-plugin-framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。