Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Thank you
|
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
1 Attachment(s)
Quote:
static_page_eval_quotes.diff has been uploaded. smarty3 calls pre/post/output filters for the {eval} tag. The recommended solution for custom pre/post/output filters is using a condition like this Code:
function x_mc_remove_currency_options($tpl_source, $smarty) |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
I don't understand what this has to do with the xAuth module. This module may or may not be included and may or may not be setup even if activated.
And I did install this patch just to prove it doesn't work. |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Quote:
The original pre-filter was Code:
function x_tpl_prefilter($source, &$smarty) The template for {eval} is Code:
This is just a simple text using "quotes" The resulted compiled template for {eval} was (which was wrong) Code:
This is unexpected behavior for the x_tpl_prefilter pre-filter The expected compiled code is something like Code:
<?php if ($_smarty_tpl->tpl_vars['x_core_started']->value) { |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
The wrong php code is
Code:
echo x_tpl_fire_event(array('name'=>"before",'tpl'=>"eval:This is just a simple text using "quotes""),$_smarty_tpl); |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
I am not sure I follow. The patch you provided static_page_eval_quotes.diff modifies xAuth module. This module is not in use, it is not setup and its code does nto run.
So how this solves the problem site wide or for static pages? I installed the patch. Going to a static page results in same blank page with same error - because the patch you provided is not for static pages and it doesn't fix anything there. |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Which modules do you use?
What is in your error logs? |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Forget modules. Stock XC. I can't show you this on the XC demo as it will not allow me to create/modify static page.
Create static page. Use double quotes in the text. Make sure " Parse Smarty tags in the content of embedded pages " option is active. Go to store fornt and try to access the static page. It results in the error I mentioned. This has nothing to do with any module. It is strictly the smarty {eval} and the value passed to it not being escaped. If you use single quotes all works ok. If the " Parse Smarty tags in the content of embedded pages " option is not active all works ok. If the double quotes are replaced by their html coding all works ok. |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Quote:
https://forum.x-cart.com/showpost.php?p=388007&postcount=115 |
Re: X-Cart 4.7 beta:new skin, in-context checkout, custom order statuses, Smarty v3
Finding another issue with static pages and in general with the whole site - language variables.
Current store I am working on has about 8000 of them. On any given page only about 100 are being assigned to smarty and can be used in templates. None of the ones used in static pages from the old store work with the new one - they are just not in the $lng array. Where is all this being assigned? Does it use some sort of cache? And how come only 100, give or take, are included in $lng array no matter which page is loaded? |
All times are GMT -8. The time now is 12:40 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.