バージョン選択

フォーラム

メニュー

オンライン状況

39 人のユーザが現在オンラインです。 (31 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 39
もっと...

サイト内検索

バグ報告 > フロント機能 > contact/index.tplでエラー発生

フロント機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
kazz_oga
投稿日時: 2024/2/23 10:47
対応状況: −−−
一人前
登録日: 2013/8/5
居住地: 東京都北区赤羽西
投稿: 144
contact/index.tplでエラー発生
▼テンプレート
[EC-CUBE] EC-CUBE2.17.2-p2
[[PHP] PHP8.0
[現象] 「問い合わせ」画面で「問い合わせ内容」を未入力でボタン「確認ページへ」をおすとerrorとなる。

2024/02/23 01:55:01 [/contact/index.php] Fatal error(E_ERROR): Uncaught TypeError: Cannot access offset of type string on string in /......./....../data/Smarty/templates_c/default/3810c523bf4d890da392927206d3576b20b9efa9_0.file.index.tpl.php:186
Stack trace:
#0 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65d6d35fb682b7_78872820()
#1 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#2 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#3 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#4 /......./....../data/Smarty/templates_c/default/58e9bda5b20de6e4e49f31d4ef5d8cc7cfb691d5_0.file.site_main.tpl.php(90): Smarty_Internal_Template->_subTemplateRender()
#5 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65d6ceb7c2c3c3_08097600()
#6 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#7 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#8 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#9 /......./....../data/Smarty/templates_c/default/7b41fa346d7d6d006f33b296cb7ffada2121e5d4_0.file.site_frame.tpl.php(140): Smarty_Internal_Template->_subTemplateRender()
#10 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65d6ceb7b20b89_07766913()
#11 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#12 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#13 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()
#14 /......./....../data/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()
#15 /......./....../data/class/SC_View.php(113): Smarty_Internal_TemplateBase->fetch()
#16 /......./....../data/class/SC_Display.php(80): SC_View->getResponse()
#17 /......./....../data/class/pages/LC_Page.php(376): SC_Display->prepare()
#18 /......./....../data/class/pages/contact/LC_Page_Contact.php(68): LC_Page->sendResponse()
#19 /......./....../data/class_extends/page_extends/contact/LC_Page_Contact_Ex.php(54): LC_Page_Contact->process()
#20 /......./....../www/contact/index.php(28): LC_Page_Contact_Ex->process()
#21 {main}
thrown on [/......./....../data/Smarty/templates_c/default/3810c523bf4d890da392927206d3576b20b9efa9_0.file.index.tpl.php(186)] from 196.242.114.120
customer_id =
(): SC_Helper_HandleError::handle_error
seasoft
投稿日時: 2024/2/23 12:47
対応状況: −−−
登録日: 2008/6/4
居住地:
投稿: 7367
Re: contact/index.tplでエラー発生
2.17.2 は、まだ PHP 8 対応が不十分なところがあるようです。

個人的には Weekly build を利用しています。ただ、このパターンは、Weekly build でも変わらないかもしれません。EC-CUBE に 同梱されている Smarty の PHP 8 対応が不十分で、適切なエラーが表示されないケースもあります(*1)。

(*1) 把握している範囲では PHP 8.1 以降なので、8.0 で該当するかは不確かですが。参考 → https://github.com/smarty-php/smarty/pull/713

可能でしたら、PHP 7 を利用するのも有効かもしれません。


その上で、現状に関しましては、
data/Smarty/templates_c/default/3810c523bf4d890da392927206d3576b20b9efa9_0.file.index.tpl.php
の186行付近を抜粋いただくと、何か分かることがあるかもしれません。


----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。

kazz_oga
投稿日時: 2024/2/23 13:56
対応状況: −−−
一人前
登録日: 2013/8/5
居住地: 東京都北区赤羽西
投稿: 144
Re: contact/index.tplでエラー発生
local環境でも再現しました。local環境での186行目付近はこの内容です
<textarea>が186行目です

<th>お問い合わせ内容<span class="attention">※</span><br />
<span class="mini">(全角<?php echo smarty_modifier_script_escape((defined('MLTEXT_LEN') ? constant('MLTEXT_LEN') : null));?>
字以下)</span></th>
<td>
<span class="attention"><?php echo smarty_modifier_script_escape($_smarty_tpl->tpl_vars['arrErr']->value['contents']);?>
</span>
<textarea name="contents" class="box380" cols="60" rows="20" style="<?php echo smarty_modifier_script_escape(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'sfGetErrorColor' ][ 0 ], array( smarty_modifier_h($_smarty_tpl->tpl_vars['arrErr']->value['contents']['value']) )));?>
; ime-mode: active;"><?php echo smarty_modifier_script_escape("\n");
echo smarty_modifier_script_escape(smarty_modifier_h($_smarty_tpl->tpl_vars['arrForm']->value['contents']['value']));?>
</textarea>
<p class="mini attention">※ご注文に関するお問い合わせには、必ず「ご注文番号」をご記入くださいますようお願いいたします。</p>
</td>
kazz_oga
投稿日時: 2024/2/24 10:40
対応状況: 解決済
一人前
登録日: 2013/8/5
居住地: 東京都北区赤羽西
投稿: 144
Re: contact/index.tplでエラー発生
contact/index.tplの123行目付近の次の記述を修正しました。

■修正前
<textarea name="contents" class="box380" cols="60" rows="20" style="<!--{$arrErr.contents.value|h|sfGetErrorColor}-->; ime-mode: active;">
■修正箇所
$arrErr.contents.value|h -> $arrErr.contents|h

これで「※ お問い合わせ内容が入力されていません。」のメッセージが正常に出ました。
seasoft
投稿日時: 2024/2/26 17:24
対応状況: −−−
登録日: 2008/6/4
居住地:
投稿: 7367
Re: contact/index.tplでエラー発生
解決されたようで良かったです。
丁寧にご報告ありがとうございます。

最新の Weekly build では該当箇所が無いようですので確認しましたところ、過日ご報告いただいた後に修正済みだったようです。
https://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=26712&forum=8&post_id=106064#forumpost106064
https://github.com/EC-CUBE/ec-cube2/pull/536

EC-CUBE2.17.2-p2 は、セキュリティリリースのためこの修正が含まれず、Weekly build 及び 2.17.3 以降での反映になると思います。


----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。

スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,809名です
総投稿数は109,973件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1644
8
red
1570
9
mcontact
1289
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.