• kazskater99

    (@kazskater99)


    NOT SURE WHAT TO DO

    The "a2a_follow_widget" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "a2a_follow_widget" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_video" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_video" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "custom_html" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "text" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "text" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "text" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_video" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "weekly-material-schedule" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_video" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_video" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    
    Error notice
    The "media_image" block was affected by errors and may not function properly. Check the developer tools for more details.
    • This topic was modified 1 year ago by James Huff. Reason: link moved to proper field

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Moderator James Huff

    (@macmanx)

    Are you seeing those in your browser’s dev tools?

    If so, please make sure that your browser is up to date: https://browsehappy.com/

    Please try updating your browser or switching to a different browser if it is not.

    If it is, please do these two things:

    1. Try clearing your browser’s cache and cookies.
    2. Try with all browser extensions or add-ons temporarily disabled.

    Please let us know how each step goes for you, which browser (and version) you’re using, and the URL of your site if you’re still having trouble.

    Thread Starter kazskater99

    (@kazskater99)

    I made widget.php to show contents i did

    later on wince my blocker is still shown NOTICE not enquate with class editor togther. somehow show up warning message above.

    so i turn backed to classic editor but i can not use widget any more to edit..

    Moderator James Huff

    (@macmanx)

    That doesn’t really answer any of the above questions.

    Thread Starter kazskater99

    (@kazskater99)

    thank you for feedback not sure where tro loock erros in browser..

    • This reply was modified 1 year ago by James Huff. Reason: link moved to proper field
    Moderator James Huff

    (@macmanx)

    There errors you are quoting, where do you see them?

    Thread Starter kazskater99

    (@kazskater99)

    in widget area block editor

    Thread Starter kazskater99

    (@kazskater99)

    its reloading something in widget too

    Moderator James Huff

    (@macmanx)

    Ok, do you have this issue under a default theme with a widget area, like Twenty Twenty-One?

    Thread Starter kazskater99

    (@kazskater99)

    NO at all i chnaged Twenty-Nine

    Thread Starter kazskater99

    (@kazskater99)

    // ウィークリーマテリアルデータの取得関数
    function get_weekly_materials_data() {
        // ここでデータを取得するロジックを追加
        $materialsData = [
            [
                'name' => 'Admonition',
                'days' => 'Monday, Thursday',
                'characters' => [
                    ['name' => 'Tighnari', 'image' => 'https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Tighnari.png', 'element' => 'Dendro', 'rarity' => 5],
                    ['name' => 'Traveler (Dendro)', 'image' => 'https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Traveler (Dendro).png', 'element' => 'Dendro', 'rarity' => 5],
                    ['name' => 'Cyno', 'image' => 'https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Cyno.png', 'element' => 'Electro', 'rarity' => 5],
                    ['name' => 'Faruzan', 'image' => 'https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Faruzan.png', 'element' => 'Anemo', 'rarity' => 4],
                    ['name' => 'Candace', 'image' => 'https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Candace.png', 'element' => 'Hydro', 'rarity' => 4],   
                ],
            ],
                 
            // 他のマテリアルデータ...
    
            // 本日のタレントマテリアルソート
            // 今後の追加情報をコメントアウト
            /*
            usort($materialsData, function ($a, $b) {
                // 名前で比較
                return strcmp($a['name'], $b['name']);
            });
            */
    
            // 新しいキャラクターの育成素材の追加情報をコメントアウト
            /*
            $newCharacterMaterials = [
                'name' => 'New Character',
                'days' => 'Tuesday, Friday',
                'characters' => [
                    // 新しいキャラクターの情報
                ],
            ];
            $materialsData[] = $newCharacterMaterials;
            */
        ];
    
        return $materialsData;
    }
    
    // ウィジェットを登録
    function register_weekly_material_schedule_widget() {
        include_once get_template_directory() . '/Weekly_Material_Schedule_Widget.php';
        register_widget('Weekly_Material_Schedule_Widget');
    }
    
    add_action('widgets_init', 'register_weekly_material_schedule_widget');
    
    
    // カスタムスタイルのエンキューを行う関数
    //function Weekly_Material_Schedule_Widget_styles() {
        //$css_file_path = get_template_directory() . '/css/sample.css';
        //$css_last_modified = filemtime($css_file_path);
    
        // キャッシュのバージョンとして最終更新時刻を使用
        //$cache_version = $css_last_modified;
    
        // ターゲットスタイルのハンドル
        //$target_style_handle = 'custom-sample';
    
        // ウィジェットのIDを取得 ウィジェットのIDに置き換える Weekly_Material_Schedule_Widget.php 記載
        //$widget_id = 'weekly-material-schedule'; 
    
        // ウィジェットごとに異なるスタイルをエンキュー 
        //if (is_active_widget(false, false, $widget_id, true)) {
            //wp_enqueue_style($target_style_handle, get_template_directory_uri() . '/css/sample.css', array(), $cache_version);
        //}
    //}
    
    //add_action('wp_enqueue_scripts', 'Weekly_Material_Schedule_Widget_styles');
    <?php
    // Weekly_Material_Schedule_Widget.php
    
    class Weekly_Material_Schedule_Widget extends WP_Widget {
    
        public function __construct() {
            parent::__construct(
                'weekly-material-schedule', // ウィジェットのID
                'Weekly Material Schedule', // ウィジェットのタイトル
                array('description' => 'Display the weekly material farming schedule.') // ウィジェットの説明
            );
        }
    
        // ウィジェットの表示
        public function widget( $args, $instance ) {
            echo $args['before_widget'];
    
            if ( $instance['title'] ) {
                echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
            }
    
            // マスターデータを取得する処理
            $materialsData = get_weekly_materials_data();
    
            // ウィジェットの HTML を表示
            echo '<title>Farmable Today</title>';
            echo '<div class="farming-schedule" id="farmingSchedule"></div>';
    
            ?>
            <!--<script>
                // ブラウザのローカルタイムゾーンで曜日、日付、時間を表示
                function updateDateTime() {
                    const farmingScheduleElement = document.getElementById('farmingSchedule');
                    if (farmingScheduleElement) {
                        const now = new Date();
                        const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', timeZoneName: 'short' };
                        const localDateTime = now.toLocaleString(undefined, options);
    
                        farmingScheduleElement.innerHTML = `
                            <h2>Farmable Today</h2>
                            <p>Today is ${localDateTime}</p>
                        `;
                    }
                }
    
                // 1秒ごとに更新
                setInterval(updateDateTime, 1000);
    
                // ウィジェット表示時に初回実行
                updateDateTime();
            </script>
    
            <?php
    
            // 名前で比較      
            usort($materialsData, function ($a, $b) {
                return strcmp($a['name'], $b['name']);
            });
    
            $today = date('l'); // 今日の曜日を取得
            $displayedIcons = []; // すでに表示されたアイコンの名前を保持する配列
            $farmingSectionDisplayed = false; // farming-section charactersが表示されたかどうかのフラグ
    
            foreach ($materialsData as $set) {
                if (in_array($today, explode(', ', $set['days']))) {
                    // farming-section charactersがまだ表示されていない場合
                    if (!$farmingSectionDisplayed) {
                        echo "<div class='farming-section characters'>"; // farming-section charactersを開始
                        $farmingSectionDisplayed = true; // フラグを立てて表示済みとする
                        echo "  <div class='farming-list'>"; // farming-listを開始
                    }
    
                    // farming-list-itemの開始
                    echo "    <div class='farming-list-item'>";
                    echo "      <div class='farming-icon-wrapper'>";
                    // キャラクターのタレントレベルに必要なアセンション素材のアイコン(画像)と名前を表示
                    echo "        <img alt='{$set['name']}' class='farming-icon' src='https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Farming/{$set['name']}.png'>";
                    echo "        <p>{$set['name']}</p>"; // farming-iconの名前を表示
                    echo "      </div>";
                    echo "      <div class='farming-characters'>";
    
                    foreach ($set['characters'] as $character) {
                        // キャラクターの名前と画像を表示
                        echo "        <div class='character-info'>";
                        echo "          <a href='/characters/{$character['name']}' class='tierlist-portrait' style='order:-{$character['rarity']}'>";
                        echo "            <img alt='{$character['name']}' class='tierlist-icon rarity-{$character['rarity']}' src='{$character['image']}'>";
                        echo "            <img alt='{$character['element']}' class='tierlist-type' src='https://gamewidth.net/wp-content/themes/Xiaoyu Tekken7/images/genshin/Characters/Element_{$character['element']}.png'>";
                        echo "          </a>";
                        //echo "          <p style='text-align: center;'>{$character['name']}</p>"; // 中央揃えに変更
                        echo "        </div>";
                    }
    
                    echo "      </div>"; // farming-charactersの終了
                    echo "    </div>"; // farming-list-itemの終了
    
                    // 各アセンション素材に対するアイコン名を取得し、重複表示を防ぐために$displayedIconsに追加する
                    $iconKey = $set['name']; // 現在のアセンション素材のアイコン名
                    $displayedIcons[] = $iconKey; // 表示済みのアイコンの配列に追加
                }
            }
    
            if ($farmingSectionDisplayed) {
                // farming-section charactersが表示されている場合
    
                // farming-listの終了
                echo "  </div>"; 
                // farming-section charactersの終了
                echo "</div>";
            }
    
            echo $args['after_widget'];
        }
    
        // ウィジェットの設定フォームを表示
        public function form($instance) {
            // タイトルの取得
            $title = !empty($instance['title']) ? $instance['title'] : esc_html__('New title', 'text_domain');
            ?>
            <p>
                <label for="<?php echo esc_attr($this->get_field_id('title')); ?>">
                    <?php esc_attr_e('Title:', 'text_domain'); ?>
                </label>
                <input
                    class="widefat"
                    id="<?php echo esc_attr($this->get_field_id('title')); ?>"
                    name="<?php echo esc_attr($this->get_field_name('title')); ?>"
                    type="text"
                    value="<?php echo esc_attr($title); ?>">
            </p>
            <?php
        }
    
        // ウィジェットの設定フォームのデータ更新処理
        public function update($new_instance, $old_instance) {
            $instance = array();
            $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
            return $instance;
        }
    }
    ?>
    <script>
        // ユーザーのローカルタイムゾーンに基づいて曜日、日付、時間を取得する関数
        function getLocalDateTime() {
            const now = new Date();
            const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', timeZoneName: 'short' };
            return now.toLocaleString(undefined, options);
        }
    
        // ブラウザのローカルタイムゾーンで曜日、日付、時間を表示
        function updateDateTime() {
            document.getElementById('farmingSchedule').innerHTML = `
                <h2>Farmable Today</h2>
                <p>Today is ${getLocalDateTime()}</p>
            `;
        }
    
        // 1秒ごとに更新
        setInterval(updateDateTime, 1000);
    </script>
    

    // Weekly_Material_Schedule_Widget.php function.php

    I delated all above NO MORE ERROR show up.

    Moderator James Huff

    (@macmanx)

    You have the same errors in the Widget section of your Dashboard under the Twenty Nineteen theme without the widget file itself being modified?

    Please be as detailed as you can in all of your replies.

    Thread Starter kazskater99

    (@kazskater99)

    THOSE CODE IS recently i did even though NOTICE HAS BEEN HERE FOR WHILE.

    Notice: Function wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in /home/kaztokyo/www/wordpress/wp-includes/functions.php on line 6031

    I turned off MAX MEGA MENU too

    Widget area I USED

    I need to fix this but not sure..

    Thread Starter kazskater99

    (@kazskater99)

    Only my theme I think error show up

    but This message has been while for long time below

    Notice: Function wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see?Debugging in WordPress?for more information. (This message was added in version 5.8.0.) in?/home/kaztokyo/www/wordpress/wp-includes/functions.php?on line?6031

    Thread Starter kazskater99

    (@kazskater99)

    Notice: Function wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see?Debugging in WordPress?for more information. (This message was added in version 5.8.0.) in?/home/kaztokyo/www/wordpress/wp-includes/functions.php?on line?6031

    NOT SURE WHAT TO DO THIS PROBLEM ↑

    I want to do this below ↓

    I can not create custom widget cus of wideget problem i am facing not sure how i get. shown NOTICE.

    I can not use widget area for plugin as not safe but i can still use may cause problem.

    AS fas as i know…..

    Moderator James Huff

    (@macmanx)

    Ok, so it sounds like the problem is the custom code you added to the file.

    Hang in there for someone who has the time to dig into it, or you can hire someone to rewrite your custom code from?https://jobs.wordpress.net?(and do not accept any hire or direct access offers posted on these forums, as that would that be against forum rules and a terrible way to start that kind of a relationship).

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘WARNING1 “media_video” block was affected by errors’ is closed to new replies.