2

enter image description hereI upgraded (luckily) my testserver to 2.3.4 (from 2.3.3) and i can't view the full order information anymore. Also mail is not send when i want to send an invoice.

Strange thing is that i also upgraded an other server with almost the same configuration and there is no problem...

system.log:

main.CRITICAL: Notice: Undefined offset: 1 in vendor/magento/framework/Filter/DirectiveProcessor/IfDirective.php on line 43

exception.log

main.CRITICAL: Notice: Undefined offset: 1 in vendor/magento/framework/Filter/DirectiveProcessor/IfDirective.php on line 43 {"exception":"[object] (Exception(code: 0): Notice: Undefined offset: 1 in vendor/magento/framework/Filter/DirectiveProcessor/IfDirective.php on line 43 at vendor/magento/framework/App/ErrorHandler.php:61)"} []

enter image description here

  • What about Orders after upgrading, can you fully see them ? – Mage2 Habibi Mar 4 at 9:54
  • Before upgrading (2.3.3) the adress and account information were fine, after upgrading (2.3.4) they dissapeared – Jilco Tigchelaar Mar 4 at 12:04
2
+100

I had the exact same issue.

After removing the rows in database table "directory_country_format" it works fine again. Hope it works for you too.

| improve this answer | |
  • Yes! This did the trick, strange that this table pops-up suddenly – Jilco Tigchelaar Mar 5 at 14:11
2

My guess is that there's an if directive somewhere (in your e-mail template or such) and it's using a variable which isn't accessible (anymore?).

if directive:

{if var}text{/if}
| improve this answer | |
  • Is my email template (or extension) influencing the display of an order in the admin view? I already switched out my email extension and that didn't improve, maybe i have some modifications in my theme that are regarding to email. Any idea in wich folder/file i have to wach? – Jilco Tigchelaar Mar 4 at 10:18
  • One would expect that the if directive and the order info issue are 2 separate things. Are order e-mails getting sent after disabling your e-mail extension? The email templates can be found in email/ directories and stored in email_template. If e-mails are getting sent, there should be an other reason/error which breaks the order view. – Quisse Mar 4 at 11:13
2

Neither the first nor the second solution worked for me.

My database table "directory_country_format" was empty and after deleting some if statements in two email templates the error still occured.

But - I made a database dump and found "{{if" statements in:

- customer/address_templates/text' - customer/address_templates/oneline - customer/address_templates/pdf

These can be found in Stores > Configuration > Customers > Customer Configuration > Address Templates.

I took these templates from a fresh Magento 2 installation:

Text:

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}
{{depend company}}{{var company}}{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}{{/depend}}
{{depend street3}}{{var street3}}{{/depend}}
{{depend street4}}{{var street4}}{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}F: {{var fax}}{{/depend}}
{{depend vat_id}}VAT: {{var vat_id}}{{/depend}}

Text Oneline:

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}, {{var street}}, {{var city}}, {{var region}} {{var postcode}}, {{var country}}

PDF:

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}|
{{depend company}}{{var company}}|{{/depend}}
{{if street1}}{{var street1}}|{{/if}}
{{depend street2}}{{var street2}}|{{/depend}}
{{depend street3}}{{var street3}}|{{/depend}}
{{depend street4}}{{var street4}}|{{/depend}}
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}|
{{var country}}|
{{depend telephone}}T: {{var telephone}}|{{/depend}}
{{depend fax}}F: {{var fax}}|{{/depend}}|
{{depend vat_id}}VAT: {{var vat_id}}{{/depend}}|

And with these templates the error is gone! AND I had a second problem - no order emails were sent - this problem is also gone!

| improve this answer | |
0

I also had this issue. In my case it was caused by a missing {{/if}} in the HTML customer address template. This template worked under Magento 1.9.2 but after migration it caused the issue in Magento 2.3.3.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.