• Resolved takashi7777

    (@takashi7777)


    Hello, I am Japanese and cannot use English, so I am writing this text using a translation site. Therefore, there may be cases where the text may not be understood by you. Please understand in that case. I apologize in advance.
    Also, my programming level is only a little more competent than a beginner, so I apologize if I have misjudged the story.

    Now, I am using “CJT PLUS” and when I upgrade the PHP version to 8 or later, I get some errors.

    1. “Warning: Attempt to read property ‘ID’ on null in /home/…… /css-javascript-toolbox/controllers/blocks-coupling.php on line 436”
      This error appears when navigating to the wp edit page, and some of the corresponding javaScript is not working properly. (JS ajax does not work well, etc.).
      After a bit of digging I found out that it appears when I activate the [Website Backend] checkbox under [Aux], but I have not been able to figure out how to fix the error any further.
      Is this a problem with the CJT PLUS plugin itself?
      By the way, if I revert the php version to a pre-8 version, such as php7.4.33, the error does not appear and the corresponding javaScript and CSS work and adapt without problems.
      If you figure out how to fix the problem, please let me know. Best regards.
    2. “Undefined array key ‘9001’ in /home/…… /css-javascript-toolbox/framework/php/evaluator/evaluator.inc.php(51) : eval()’d code on line 122”
      ‘Undefined array key’ and ‘Uninitialized string offset’ errors appeared frequently after upgrading to PHP version 8 or later. I have been able to eliminate all of these errors so far by correcting or avoiding the errors on my own.
      Am I correct in assuming that these errors were not accepted as undefined or uninitialized in php8 or later, but were ambiguously handled and working in php8 or earlier? Or is there a problem with the “CJT” or “CJT PLUS” plugins?

    I know you are busy, but if you have any solutions or suggestions, could you please let me know? Thank you in advance.

    original:
    こんにちは、私は日本人で、英語が使えないため、翻訳サイトを用いてこの文章を書いています。そのため、あなたに伝わる文章になっていない場合があるかもしれません。その際はご了承ください。あらかじめ、お詫びいたします。
    また、私のプログラミングレベルは初心者より少しできる程度の力量しかないため、見当違いの話をしていた場合は、申し訳ありません。

    さて、私は「CJT PLUS」を使用していますが、PHPバージョンを8以降にアップグレードすると、いくつかのエラーが発生します。
    1. 「Warning: Attempt to read property “ID” on null in /home/……/css-javascript-toolbox/controllers/blocks-coupling.php on line 436」
    このエラーは、wpの編集画面に移動した際表示され、該当するjavaScriptの一部が上手く作動しない状況となります。(JSのajaxが上手く動かないなど)
    少し、エラーの原因を探ってみると[Aux]の[Website Backend]にチェックを入れて作動させると表示されることまでは、突き止めましたが、それ以上エラーを修正する術が私にはわかりませんでした。
    これは、CJT PLUSのプラグイン自体の問題点ではないですか?
    ちなみに、phpのバージョンをphp7.4.33などの8以前のバージョンに戻すと、エラーは表示されず、該当するjavaScriptやCSSは問題なく作動?適応します。
    問題を解決する方法が分かりましたら、教えてください。よろしくお願いします。

    2. 「Undefined array key “9001” in /home/……/css-javascript-toolbox/framework/php/evaluator/evaluator.inc.php(51) : eval()’d code on line 122」

    「Undefined array key」や「Uninitialized string offset 」のエラーがPHPバージョン8以降にアップグレードすると頻発して表示されました。これらのエラーは、自力でエラーを修正や回避することで、現在のところ全てエラーを解消できました。
    これらのエラーは、php8以降では未定義や未初期化は受け付けず、php8以前では曖昧に処理されていて、作動していたと捉えてよろしいでしょうか?それとも「CJT」か「CJT PLUS」のプラグインに問題があるのでしょうか?

    お忙しいとは思いますが、解決方法やご意見がありましたら、教えてもらえないでしょうか。よろしくお願いいたします。

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Hello,

    Thank you for providing us with this error report. We apologise for the delay. We are currently looking into this and will get back to you as soon as possible.

    Thank you for your patience.

    Thread Starter takashi7777

    (@takashi7777)

    Hello!

    thank you for your prompt reply.

    We will wait for the error to improve, thank you.

    Plugin Support Aditya Bhaskar Sharma

    (@adictonat0r)

    Hi @takashi7777

    Thank you for reaching out and for your detailed explanation. Your message was perfectly understood, and I appreciate your effort in communicating despite the language barrier.

    The errors you are seeing, such as “Attempt to read property ‘ID’ on null” and “Undefined array key”, are mainly due to changes in how PHP 8 handles variables and data. In earlier versions of PHP, these warnings were often ignored, but PHP 8 is stricter, so it shows these errors when it encounters unexpected data or missing values.

    Here’s how we can address the issues:

    1. “Attempt to read property ‘ID’ on null”: This error usually happens when the plugin tries to access data that doesn’t exist. It appears when you activate the [Website Backend] checkbox under [Aux]. We will work on updating the plugin to handle these cases better in future releases. In the meantime, if possible, you can temporarily avoid using the [Website Backend] option or stick with PHP 7.4 until an update is released.
    2. “Undefined array key” and “Uninitialized string offset”: Your understanding is correct—PHP 8 handles these situations differently than PHP 7.4, which is why these errors are appearing. We are gradually updating CJT PLUS to be fully compatible with PHP 8 and beyond, and these adjustments will be included in upcoming updates.

    For now, you can continue correcting these on your own as you have been doing, or use PHP 7.4, which seems to work well for you.

    We appreciate your patience, and we are committed to making our plugin fully compatible with the latest PHP versions as soon as possible. If you encounter more issues or need further assistance, please don’t hesitate to let us know.

    Thank you again for using CJT PLUS and for your detailed feedback.

    Best regards,
    Aditya
    Contributor & Maintainer

    Thread Starter takashi7777

    (@takashi7777)

    Hi Aditya Bhaskar Sharma

    Thank you for your prompt, thorough and clear answer. It was very helpful.
    Regarding the “Attempt to read property ‘ID’ on null” error, I would like to use php7.4 until an update is made.
    I look forward to the update release and thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.