プラグイン > バグ報告・利用に関する質問 > Impossible to access an attribute ("name01") on a string variable ("anon.").について |
バグ報告・利用に関する質問
スレッド表示 | 古いものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
shige0309 |
投稿日時: 2019/3/23 23:52
対応状況: −−−
|
半人前 登録日: 2018/2/27 居住地: 投稿: 28 |
Re: Impossible to access an attribute ("name01") on a string variable ("anon.").について umebius様ありがとうございます。
{% if is_granted('ROLE_USER') and app.user.name01 != '' %} に変更した所、「Impossible to access an attribute ("name01") on a string variable ("anon.").」は発生しなくなりましたが、下記エラーが発生しました。 An exception has been thrown during the rendering of a template ("User Warning: Unable to generate a URL for the named route "block_header_right_menu" as such route does not exist."). 「block_header_right_menu」が存在しないと警告されているようです。Blockフォルダにファイルが存在しないということでしょうか。 |
umebius |
投稿日時: 2019/3/23 23:32
対応状況: −−−
|
神 登録日: 2016/7/22 居住地: 投稿: 2085 |
Re: Impossible to access an attribute ("name01") on a string variable ("anon.").について ログインしているかの判定が必要なので
{% if app.user.name01 != '' %}を下記に変更する必要があります。 {% if is_granted('ROLE_USER') and app.user.name01 != '' %} app.user.name01 が空文字の可能性がないのであれば {% if is_granted('ROLE_USER') %}だけで十分かもしれません。
|
shige0309 |
投稿日時: 2019/3/23 23:30
対応状況: −−−
|
半人前 登録日: 2018/2/27 居住地: 投稿: 28 |
Impossible to access an attribute ("name01") on a string variable ("anon.").について ▼テンプレート
[EC-CUBE] 3.0.16 [レンタルサーバ] さくらインターネット レンタルサーバー スタンダード [OS] FreeBSD 11.2-RELEASE-p8 amd64 [PHP] PHP 7.2.14 [データベース] MySQL 5.7 [WEBサーバ] nginx + Apache2.4系 [ブラウザ] Google Chrome 72.0.3626.121 [導入プラグインの有無] 詳しい商品一覧 BrandingAdmin キャンセル時 在庫を自動で戻します 最近チェックした商品 規格詳細表示 お問い合わせ管理 GoogleAnalytics簡単設置プラグイン この商品をみた人はこんな商品もみています MailMagazine 新着商品 新着情報画像 for EC-CUBE3 売れ筋順プラグイン for EC-CUBE3 画像Zipアップローダー 新着情報ページネータ ぱんクズプラグイン おすすめ商品管理プラグイン 売上ランキング 売上集計プラグイン 一覧画面(商品管理)背景色追加プラグイン FAQ管理プラグイン 入力確認プラグイン 見積書お問い合わせ追加プラグイン [カスタマイズの有無] オリジナルテンプレートを使用しています。 [現象] データベースをテストから本番サーバーにインポートした所、下記エラーが発生し、エラー内容も解除方法もわからず困っています。 Impossible to access an attribute ("name01") on a string variable ("anon."). 「default_frame.twig」の下記で発生しているようです。 <div class="container clearfix"> {% if app.user.name01 != '' %} <p class="d-none d-lg-block float-right">ようこそ {{ app.user.name01 }} {{ app.user.name02 }}様</p> {% else %} <p class="d-none d-lg-block float-right">ようこそ ゲスト様</p> {% endif %} </div> 申し訳ございませんが、皆さんのお力を頂けますと幸いです。 |
« 1 (2) |
スレッド表示 | 古いものから | 前のトピック | 次のトピック | トップ |